Bigtop
  1. Bigtop
  2. BIGTOP-826

Wrong return code returned when stopping Hue on RHEL/SUSE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.6.0
    • Component/s: rpm
    • Labels:
      None

      Description

      When stopping the hue service, the wrong return code is returned (1 instead of 0). This happens on RHEL5, RHEL6 and SUSE

      1. BIGTOP-826.1.patch
        2 kB
        Mark Grover
      2. BIGTOP-826.2.patch
        2 kB
        Mark Grover

        Issue Links

          Activity

          Hide
          Mark Grover added a comment -

          Tested on RHEL6 (64bit) and saw the correct return code.

          sudo service hue stop

          Show
          Mark Grover added a comment - Tested on RHEL6 (64bit) and saw the correct return code. sudo service hue stop
          Hide
          Roman Shaposhnik added a comment -

          You sure not setting up RETVAL is a good idea? My recollection is that it is a global var that other places of the script might inspect. Other than that – looks good.

          Show
          Roman Shaposhnik added a comment - You sure not setting up RETVAL is a good idea? My recollection is that it is a global var that other places of the script might inspect. Other than that – looks good.
          Hide
          Mark Grover added a comment -

          For making the reviewers life easier, here is the diff between patch 1 and patch 2.

          localhost:bigtop mgrover$ diff ~/BIGTOP-826.1.patch ~/BIGTOP-826.2.patch 
          1c1
          < From 4d5ce77dcacb5d303904986ce18ab2dc36dfa2b2 Mon Sep 17 00:00:00 2001
          ---
          > From 8706c5769df008f7b44a37c8268f55456c4b5b8e Mon Sep 17 00:00:00 2001
          3c3
          < Date: Wed, 16 Jan 2013 10:09:48 -0800
          ---
          > Date: Thu, 17 Jan 2013 16:12:11 -0800
          9,10c9,10
          <  bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse |    8 ++++----
          <  2 files changed, 8 insertions(+), 9 deletions(-)
          ---
          >  bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse |    9 +++++----
          >  2 files changed, 9 insertions(+), 9 deletions(-)
          47c47
          < index 446e969..32fc469 100644
          ---
          > index 446e969..cd0a041 100644
          67c67
          < @@ -91,9 +91,9 @@ hue_stop() {
          ---
          > @@ -91,9 +91,10 @@ hue_stop() {
          75c75,76
          < +  return 0
          ---
          > +  RETVAL=0
          > +  return $RETVAL
          
          Show
          Mark Grover added a comment - For making the reviewers life easier, here is the diff between patch 1 and patch 2. localhost:bigtop mgrover$ diff ~/BIGTOP-826.1.patch ~/BIGTOP-826.2.patch 1c1 < From 4d5ce77dcacb5d303904986ce18ab2dc36dfa2b2 Mon Sep 17 00:00:00 2001 --- > From 8706c5769df008f7b44a37c8268f55456c4b5b8e Mon Sep 17 00:00:00 2001 3c3 < Date: Wed, 16 Jan 2013 10:09:48 -0800 --- > Date: Thu, 17 Jan 2013 16:12:11 -0800 9,10c9,10 < bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse | 8 ++++---- < 2 files changed, 8 insertions(+), 9 deletions(-) --- > bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse | 9 +++++---- > 2 files changed, 9 insertions(+), 9 deletions(-) 47c47 < index 446e969..32fc469 100644 --- > index 446e969..cd0a041 100644 67c67 < @@ -91,9 +91,9 @@ hue_stop() { --- > @@ -91,9 +91,10 @@ hue_stop() { 75c75,76 < + return 0 --- > + RETVAL=0 > + return $RETVAL
          Hide
          Mark Grover added a comment -

          Thanks for pointing that out Roman. I missed that. Addressed your comments in patch 2. Let me know how it looks. Thanks!

          Show
          Mark Grover added a comment - Thanks for pointing that out Roman. I missed that. Addressed your comments in patch 2. Let me know how it looks. Thanks!
          Hide
          Peter Linnell added a comment -

          The fix looks good, but this needs careful testing on RHEL5 or CentOS5. Some of the LSB stuff there is not fixed until 5.7.

          Show
          Peter Linnell added a comment - The fix looks good, but this needs careful testing on RHEL5 or CentOS5. Some of the LSB stuff there is not fixed until 5.7.
          Hide
          Roman Shaposhnik added a comment -

          +1

          Show
          Roman Shaposhnik added a comment - +1
          Hide
          Peter Linnell added a comment -

          +1 on the patch

          Show
          Peter Linnell added a comment - +1 on the patch

            People

            • Assignee:
              Mark Grover
              Reporter:
              Mark Grover
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development