Bug 1166563

Summary: [RHSC] rhsc-setup after upgrade does not check if monitoring is enabled or disabled currently, and configures monitoring as it was setup previously
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Shruti Sampat <ssampat>
Component: rhscAssignee: Sahina Bose <sabose>
Status: CLOSED ERRATA QA Contact: Shruti Sampat <ssampat>
Severity: high Docs Contact:
Priority: medium    
Version: rhgs-3.0CC: asrivast, dpati, knarra, nlevinki, nsathyan, psriniva, rhs-bugs, rhsc-qe-bugs, rnachimu, sabose, sharne, shtripat, ssampat
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.0.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhsc-setup-plugins-3.0.4-1.1.el6rhs Doc Type: Bug Fix
Doc Text:
Previously, during the initial set up of the Red Hat Storage Console setup tool, if you disable the monitoring feature and later enable it using 'rhsc-monitoring enable' command, the answer file in the Red Hat Storage Console setup tool file did not get updated with the new value. Consequently, if you upgrade the Red Hat Storage Console and execute the Red Hat Storage Console setup again, it looks for the value in the answer file and finds that monitoring is not enabled and accordingly sets it to the disabled state. With this fix, during every run of 'rhsc-setup' command, a message is displayed asking if the user wants to enable monitoring.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-26 06:33:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1153907, 1182947    

Description Shruti Sampat 2014-11-21 09:09:29 UTC
Description of problem:
--------------------------

Consider rhsc-setup to be run with monitoring disabled. At a later point, monitoring was enabled using the command -

# rhsc-monitoring enable

Now consider that rhsc-setup was updated to a later version and rhsc-setup is run again. This time, instead of keeping monitoring turned on as expected, it disables monitoring as part of setup (as it was disabled when rhsc-setup was initially run)

So, after running rhsc-setup after update, the status of monitoring is as follows -

# rhsc-monitoring status
RHSC monitoring is not enabled.
Nagios is running
NSCA is running

Version-Release number of selected component (if applicable):
--------------------------------------------------------------
rhsc-3.0.3-1.19.el6rhs.noarch

How reproducible:
-------------------
Always

Steps to Reproduce:
--------------------
1. Run rhsc-setup and configure monitoring to be disabled.
2. Enable monitoring using the command -
# rhsc-monitoring enable

The status of monitoring is now -
# rhsc-monitoring status
RHSC monitoring is enabled.
Nagios is running
NSCA is running

3. Update the rhsc-setup package and run # rhsc-setup again.

Actual results:
----------------
Monitoring is disabled as part of rhsc-setup.

Expected results:
------------------
Monitoring should be configured as per current setting and should not depend on how it was setup initially using rhsc-setup. So in this case it should be enabled after running rhsc-setup following update.

Additional info:

Comment 1 Dusmant 2014-11-24 06:10:49 UTC
To be documented for 3.0.3 release.

Comment 2 Pavithra 2014-12-01 06:52:49 UTC
Hi Shubhendu, 

Can you please verify the technical accuracy of the doc text and sign off?

Comment 3 Shubhendu Tripathi 2014-12-01 08:56:10 UTC
I have modified the doc-text a bit. Kindly check once and re-phrase if required.

Comment 4 Shubhendu Tripathi 2014-12-01 09:49:59 UTC
Looks good.

Comment 5 Pavithra 2014-12-01 09:53:55 UTC
Made an edit.

Comment 7 Sahina Bose 2015-02-12 11:57:40 UTC
With the current implementation, when running "rhsc-monitoring enable" it updates a json file. However, the value chosen during setup is not updated.

Is it ok to ask the question regarding enabling monitoring again during upgrade?

Comment 8 Shruti Sampat 2015-02-12 17:39:55 UTC
I think that should be fine.

Comment 9 Sahina Bose 2015-02-13 07:19:31 UTC
Fixed to override the answer file value in case the rhsc-monitoring json file is configured

Comment 11 Sahina Bose 2015-02-23 05:55:02 UTC
As per Comment 8 and reviews on the patch, the flow has been changed to ask the user if monitoring needs to be enabled, on every run of rhsc-setup.

Comment 12 Shruti Sampat 2015-02-26 14:15:38 UTC
Verified as fixed in rhsc-setup-plugins-3.0.4-1.1.el6rhs

Tested with upgrade from RHSC 3.0.3 installation to this version. `rhsc-setup' asks the user if monitoring needs to be enabled on every run.

Comment 13 Shalaka 2015-03-13 09:23:37 UTC
Please review and sign-off edited doc text.

Comment 15 errata-xmlrpc 2015-03-26 06:33:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0681.html