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

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.23.1, 0.24.0
    • 0.23.1
    • build
    • None
    • OSX

    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment