Hadoop Common
  1. Hadoop Common
  2. HADOOP-8270

hadoop-daemon.sh stop action should return 0 for an already stopped service

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.23.1
    • Fix Version/s: 2.0.0-alpha
    • Component/s: scripts
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      The daemon stop action no longer returns failure when stopping an already stopped service.

      Description

      The following bit of code from hadoop-daemon.sh is not LSB compliant, since
      according to http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
      a stop action on an already stopped service should return 0.

       (stop)
      
          if [ -f $pid ]; then
            if kill -0 `cat $pid` > /dev/null 2>&1; then
              echo stopping $command
              kill `cat $pid`
            else
              echo no $command to stop
              exit 1
            fi
          else
            echo no $command to stop
            exit 1
          fi
          ;;
      
      1. HADOOP-8270.patch.txt
        0.5 kB
        Roman Shaposhnik

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1047 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1047/)
        HADOOP-8270. hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1047 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1047/ ) HADOOP-8270 . hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1012 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1012/)
        HADOOP-8270. hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1012 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1012/ ) HADOOP-8270 . hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2070 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2070/)
        HADOOP-8270. hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069)

        Result = ABORTED
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2070 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2070/ ) HADOOP-8270 . hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069) Result = ABORTED eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2057 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2057/)
        HADOOP-8270. hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2057 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2057/ ) HADOOP-8270 . hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2131 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2131/)
        HADOOP-8270. hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2131 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2131/ ) HADOOP-8270 . hadoop-daemon.sh stop action should return 0 for an already stopped service. Contributed by Roman Shaposhnik (Revision 1325069) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1325069 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
        Hide
        Eli Collins added a comment -

        I've committed this and merged. Thanks Roman.

        Show
        Eli Collins added a comment - I've committed this and merged. Thanks Roman.
        Hide
        Eli Collins added a comment -

        +1 looks good, the test failure is unrelated, no new test since it's the daemon.sh script.

        Show
        Eli Collins added a comment - +1 looks good, the test failure is unrelated, no new test since it's the daemon.sh script.
        Hide
        Roman Shaposhnik added a comment -

        I've done local testing with manual runs of HDFS stop commands. Seems to work pretty good.

        Show
        Roman Shaposhnik added a comment - I've done local testing with manual runs of HDFS stop commands. Seems to work pretty good.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12522342/HADOOP-8270.patch.txt
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.fs.viewfs.TestViewFsTrash

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/847//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/847//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12522342/HADOOP-8270.patch.txt against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.fs.viewfs.TestViewFsTrash +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/847//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/847//console This message is automatically generated.

          People

          • Assignee:
            Roman Shaposhnik
            Reporter:
            Roman Shaposhnik
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development