Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-7948

Shell scripts created by hadoop-dist/pom.xml to build tar do not properly propagate failure

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.23.1, 0.24.0
    • Fix Version/s: 0.23.1
    • Component/s: build
    • Labels:
      None
    • Environment:

      OSX

    • Hadoop Flags:
      Reviewed

      Description

      The run() function, as defined in dist-layout-stitching.sh and dist-tar-stitching, created in hadoop-dist/pom.xml, does not properly propagate the error code of a failing command. See the following:

          ...
          "${@}"                 # call fails with non-zero exit code
          if [ $? != 0 ]; then   
              echo               
              echo "Failed!"     
              echo               
              exit $?            # $?=result of echo above, likely 0, thus exit with code 0
          ...
      

        Attachments

        1. HADOOP-7948.patch
          1 kB
          Michajlo Matijkiw

          Activity

            People

            • Assignee:
              cim_michajlomatijkiw Michajlo Matijkiw
              Reporter:
              cim_michajlomatijkiw Michajlo Matijkiw
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: