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
(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.
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]$ ==================================================================
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