Bug 1470528 - Do not blindly ignore subscription-manager errors
Summary: Do not blindly ignore subscription-manager errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gdeploy
Version: rhgs-3.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: RHGS 3.3.1 Async
Assignee: Sachidananda Urs
QA Contact: Manisha Saini
URL:
Whiteboard:
Depends On:
Blocks: 1581561
TreeView+ depends on / blocked
 
Reported: 2017-07-13 06:20 UTC by Sachidananda Urs
Modified: 2018-06-21 03:34 UTC (History)
7 users (show)

Fixed In Version: gdeploy-2.0.2-26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-21 03:33:14 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:1958 0 None None None 2018-06-21 03:34:47 UTC

Description Sachidananda Urs 2017-07-13 06:20:36 UTC
Description of problem:

subscription-manager errors can be of two types:
i. Actual errors (incorrect username/password/network timeout etc)
ii. Error due to `User already subscribed`

Handle the above errors gracefully instead of ignoring the errors blindly.

Refer: BZ #1405966

Comment 3 Sachidananda Urs 2017-09-14 07:36:59 UTC
(In reply to Sachidananda Urs from comment #0)
> Description of problem:
> 
> subscription-manager errors can be of two types:
> i. Actual errors (incorrect username/password/network timeout etc)
> ii. Error due to `User already subscribed`
> 
> Handle the above errors gracefully instead of ignoring the errors blindly.
> 
> Refer: BZ #1405966

The latest version of Ansible invalidates this bug.
subscription-module in Ansible handles the `already subscribed' cases.

I'll keep this bug open for QE to verify.

Steps to reproduce:
===================

Subscribe to CDN with the below config file:

**********************

[hosts]
host-1
host-2
host-3
host-4

#Subscribe to necessary channels
[RH-subscription1]
action=register
username=user
password=<password>
ignore_register_errors=no

**********************

Once subscribed, re-run the configuration file. One should not see
any errors.

Comment 8 Sachidananda Urs 2018-04-16 15:20:46 UTC
Commit: https://github.com/gluster/gdeploy/pull/499/commits/44afd9ff521d40

Should fix the issue.

===================================

[sac@dhcp35-44 tmp]$ gdeploy -c subscription_error.conf       

PLAY [gluster_servers] *****************************************************************************************************

TASK [Register with activation key, if activation key is provided] *********************************************************
skipping: [10.70.42.25]        

TASK [Register with subscription-manager with username and password] *******************************************************
changed: [10.70.42.25]                                                                                                      
                                                                                                                            
TASK [Attach to Red Hat subscription pool] *********************************************************************************
changed: [10.70.42.25]         

TASK [Disable all rhsm repos] **********************************************************************************************
skipping: [10.70.42.25]        

TASK [Enable necessary rhsm repos] *****************************************************************************************

TASK [Remove old apt-mirror repository definition.] ************************************************************************
ok: [10.70.42.25]                                                                                                           

PLAY RECAP *****************************************************************************************************************
10.70.42.25                : ok=3    changed=2    unreachable=0    failed=0          

-----------------------

Running the configuration again shows:
======================================

[sac@dhcp35-44 tmp]$ gdeploy -c subscription_error.conf 

PLAY [gluster_servers] *****************************************************************************************************

TASK [Register with activation key, if activation key is provided] *********************************************************
skipping: [10.70.42.25]

TASK [Register to subscription-manager with username and password] *********************************************************
ok: [10.70.42.25]                                                                                                                               
TASK [Attach to Red Hat subscription pool] *********************************************************************************
ok: [10.70.42.25]

TASK [Disable all rhsm repos] **********************************************************************************************
skipping: [10.70.42.25]

TASK [Enable necessary rhsm repos] *****************************************************************************************

TASK [Remove old apt-mirror repository definition.] ************************************************************************
ok: [10.70.42.25]

PLAY RECAP *****************************************************************************************************************
10.70.42.25                : ok=3    changed=0    unreachable=0    failed=0   

[sac@dhcp35-44 tmp]$ 

==================================================================

Comment 11 errata-xmlrpc 2018-06-21 03:33:14 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/RHEA-2018:1958


Note You need to log in before you can comment on or make changes to this bug.