Bigtop
  1. Bigtop
  2. BIGTOP-22 Unify init scripts
  3. BIGTOP-225

Exit consistently in init scripts for stop on stopped service

    Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.1.0
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None

      Description

      our init scripts exit with both 0 and 1 when calling stop on a stopped service. It's common to exit successful when stopping an already stopped service.

      LSB agrees with this: "In addition to straightforward success, the following situations are also to be considered successful: ... running stop on a service already stopped or not running"

      http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

      root@node00:~/zookeeper# for file in /etc/init.d/hadoop-*; do $file stop 2>/dev/null >&2; printf "%50s %d\n" $file $?;done
      /etc/init.d/hadoop-datanode 1
      /etc/init.d/hadoop-jobtracker 1
      /etc/init.d/hadoop-namenode 1
      /etc/init.d/hadoop--secondarynamenode 1
      /etc/init.d/hadoop-tasktracker 1
      /etc/init.d/hadoop-hbase-master 0
      /etc/init.d/hadoop-hbase-regionserver 0
      /etc/init.d/hadoop-zookeeper-server 1
      root@node00:~/zookeeper# for file in /etc/init.d/hadoop-*; do $file stop 2>/dev/null >&2; printf "%50s %d\n" $file $?;done
      /etc/init.d/hadoop-datanode 1
      /etc/init.d/hadoop-jobtracker 1
      /etc/init.d/hadoop--namenode 1
      /etc/init.d/hadoop--secondarynamenode 1
      /etc/init.d/hadoop--tasktracker 1
      /etc/init.d/hadoop-hbase-master 0
      /etc/init.d/hadoop-hbase-regionserver 0
      /etc/init.d/hadoop-zookeeper-server 1

      http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Peter Linnell
              Reporter:
              Peter Linnell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development