Bug 1405966

Summary: Make ignore errors=yes by default for rh_subscription feature.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: RamaKasturi <knarra>
Component: gdeployAssignee: Sachidananda Urs <surs>
Status: CLOSED ERRATA QA Contact: Manisha Saini <msaini>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: amukherj, asrivast, bmohanra, rcyriac, rhinduja, rhs-bugs, smohan, srmukher, storage-qa-internal, surs
Target Milestone: ---   
Target Release: RHGS 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdeploy-2.0.1-2 Doc Type: Bug Fix
Doc Text:
Previously, gdeploy would fail if a subscribed user tries to subscribe again as subscription-manager would report error stating user already subscribed. Since the failure did not report to anything fatal, it can be ignored. Users can also debug in case they face any genuine subscription-manager error.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-21 04:49:50 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: 1417147    

Description RamaKasturi 2016-12-19 10:55:26 UTC
Description of problem:
Currently if the system is already registered subscritption returns a non-zero value and gdeploy exits there. If user would like to continue with the installation he has to provide an option called 'ignore_register_errors=yes' for all the sections which he require, instead by default make ignore_register_errors=yes because in the previous versions of gdeploy if the system is already registered it just used to continue with out exiting.

Version-Release number of selected component (if applicable):
gdeploy-2.0.1-7.el7rhgs.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install latest version of gdeploy
2. Now run gdeploy -c robo.conf and register all the systems.
3. Run robo.conf again.

Actual results:
In the previous versions of gdeploy if the system is already registered , gdeploy used to continue. But with the current version it just exits and if user needs the same functionality like previous versions he needs to add 'ignore_register_errors=yes'

Expected results:
If the system is already registered gdeploy should just continue and should not exit. By default make ignore_register_errors=yes' for rh_subscription feature.

Additional info:

Comment 4 Sachidananda Urs 2017-01-06 07:18:36 UTC
Commit: https://github.com/gluster/gdeploy/commit/027ca7e0 fixes the issue.

Comment 6 Manisha Saini 2017-05-08 10:38:07 UTC
Verified this bug on gdeploy-2.0.2-4.el7rhgs.noarch

Steps:
1.Create 4 node cluster.
2.Subscribe to live and subscribe to following repos
rh-gluster-3-for-rhel-7-server-rpms,rh-gluster-3-nfs-for-rhel-7-server-rpms,rhel-ha-for-rhel-7-server-rpms

3.Now run the subscription_manager.conf file having subscription section again followed by volume creation.

[root@dhcp47-132 home]# cat subscription_manager.conf 

[hosts]
dhcp37-102.lab.eng.blr.redhat.com
dhcp37-92.lab.eng.blr.redhat.com
dhcp37-119.lab.eng.blr.redhat.com
dhcp37-122.lab.eng.blr.redhat.com



[RH-subscription]
action=register
username=qa
password=uuV4gQrtG7sfMP3q
pool=8a85f9823e3d5e43013e3ddd4e9509c4
repos=rh-gluster-3-for-rhel-7-server-rpms,rh-gluster-3-nfs-for-rhel-7-server-rpms,rhel-ha-for-rhel-7-server-rpms

[backend-setup]
devices=/dev/sdb,/dev/sdc,/dev/sdd
vgs=vg1,vg2,vg3
pools=pool1,pool2,pool3
lvs=lv1,lv2,lv3
mountpoints=/gluster/brick1,/gluster/brick2,/gluster/brick3
brick_dirs=/gluster/brick1/2,/gluster/brick2/2,/gluster/brick3/2


[volume]
action=create
volname=ganesha2
transport=tcp
replica_count=2
force=yes



Gdeploy ignored the subscription section with the warning as it was already registered and proceeded with volume creation.

Comment 10 errata-xmlrpc 2017-09-21 04:49:50 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://access.redhat.com/errata/RHBA-2017:2777