ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1212

zkServer.sh stop action is not conformat with LSB para 20.2 Init Script Actions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.3, 3.4.0, 3.5.0
    • Fix Version/s: 3.3.4, 3.4.0, 3.5.0
    • Component/s: scripts
    • Labels:
      None

      Description

      According to LSB Core para 20.2:
      ==================================================================================
      Otherwise,  the exit  status shall  be non­zero,  as de­fined below. 
      In addition to straightforward success, the following situations are
      also to be considered successful: 
      • restarting a service (instead of reloading it) with the force­reload argument
      • running start on a service already running
      • running stop on a service already stopped or not running
      • running restart on a service already stopped or not running
      • running try­restart on a service already stopped or not running
      ==================================================================================

      Yet, zkServer.sh fails on stop if it can't find a PID file:

      stop)
          echo -n "Stopping zookeeper ... "
          if [ ! -f "$ZOOPIDFILE" ]
          then
            echo "error: could not find file $ZOOPIDFILE"
            exit 1
          else
            $KILL -9 $(cat "$ZOOPIDFILE")
            rm "$ZOOPIDFILE"
            echo STOPPED
            exit 0
          fi
      
      1. ZOOKEEPER-1212-3.3.patch.txt
        0.4 kB
        Roman Shaposhnik
      2. ZOOKEEPER-1212.patch.txt
        0.5 kB
        Roman Shaposhnik

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development