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

        Roman Shaposhnik created issue -
        Roman Shaposhnik made changes -
        Field Original Value New Value
        Attachment HADOOP-8270.patch.txt [ 12522342 ]
        Roman Shaposhnik made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Roman Shaposhnik made changes -
        Status In Progress [ 3 ] Open [ 1 ]
        Roman Shaposhnik made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Eli Collins made changes -
        Summary hadoop-daemon.sh stop action is not LSB compliant hadoop-daemon.sh stop action should return 0 for an already stopped service
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 2.0.0 [ 12320352 ]
        Target Version/s 2.0.0 [ 12320352 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Eli Collins made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ] Incompatible change,Reviewed [ 10342,10343 ]
        Release Note The daemon stop action no longer returns failure when stopping an already stopped service.
        Target Version/s 2.0.0 [ 12320352 ]
        Fix Version/s 2.0.0 [ 12320352 ]
        Resolution Fixed [ 1 ]
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development