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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development