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

          Peter Linnell created issue -
          Peter Linnell made changes -
          Field Original Value New Value
          Link This issue is part of BIGTOP-223 [ BIGTOP-223 ]
          Peter Linnell made changes -
          Description CDH 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-0.20-datanode 1
                          /etc/init.d/hadoop-0.20-jobtracker 1
                            /etc/init.d/hadoop-0.20-namenode 1
                   /etc/init.d/hadoop-0.20-secondarynamenode 1
                         /etc/init.d/hadoop-0.20-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-0.20-datanode 1
                          /etc/init.d/hadoop-0.20-jobtracker 1
                            /etc/init.d/hadoop-0.20-namenode 1
                   /etc/init.d/hadoop-0.20-secondarynamenode 1
                         /etc/init.d/hadoop-0.20-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
          CDH 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
          Peter Linnell made changes -
          Description CDH 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
          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
          Roman Shaposhnik made changes -
          Assignee Peter Linnell [ plinnell ]
          Roman Shaposhnik made changes -
          Fix Version/s 0.4.0 [ 12318889 ]
          Fix Version/s 0.3.0 [ 12317841 ]
          Gavin made changes -
          Workflow no-reopen-closed, patch-avail [ 12640451 ] patch-available, re-open possible [ 12665909 ]
          Roman Shaposhnik made changes -
          Fix Version/s 0.5.0 [ 12321865 ]
          Fix Version/s 0.4.0 [ 12318889 ]
          Roman Shaposhnik made changes -
          Fix Version/s 0.6.0 [ 12323895 ]
          Fix Version/s 0.5.0 [ 12321865 ]
          Roman Shaposhnik made changes -
          Fix Version/s 0.6.0 [ 12323895 ]

            People

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

              Dates

              • Created:
                Updated:

                Development