Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1212

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

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.3, 3.4.0, 3.5.0
    • 3.3.4, 3.4.0, 3.5.0
    • scripts
    • 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
      

      Attachments

        1. ZOOKEEPER-1212.patch.txt
          0.5 kB
          Roman Shaposhnik
        2. ZOOKEEPER-1212-3.3.patch.txt
          0.4 kB
          Roman Shaposhnik

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment