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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.23.1
    • 2.0.0-alpha
    • scripts
    • None
    • Incompatible change, Reviewed
    • 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
          ;;
      

      Attachments

        1. HADOOP-8270.patch.txt
          0.5 kB
          Roman Shaposhnik

        Activity

          People

            rvs Roman Shaposhnik
            rvs Roman Shaposhnik
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: