Bug 2214282 - RHC system role: activation key registration fails if system is already registered [rhel-9.2.0.z]
Summary: RHC system role: activation key registration fails if system is already regis...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhel-system-roles
Version: 9.2
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 9.2
Assignee: Rich Megginson
QA Contact: Archana Pandey
URL:
Whiteboard: role:rhc
Depends On: 2186218
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-12 13:18 UTC by RHEL Program Management Team
Modified: 2023-08-08 15:02 UTC (History)
10 users (show)

Fixed In Version: rhel-system-roles-1.21.2-1.el9_2
Doc Type: Bug Fix
Doc Text:
Clone Of: 2186218
Environment:
Last Closed: 2023-08-01 08:58:56 UTC
Type: ---
Target Upstream Version:
Embargoed:
arpandey: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-159519 0 None None None 2023-06-12 13:53:40 UTC
Red Hat Product Errata RHBA-2023:4362 0 None None None 2023-08-01 08:58:58 UTC

Comment 8 Archana Pandey 2023-06-16 16:25:27 UTC
Verification steps - 

[root@kvm-07-guest03 ~]# rpm -qa rhel-system-roles
rhel-system-roles-1.21.2-1.el9_2.noarch
[root@kvm-07-guest03 ~]# 
[root@kvm-07-guest03 ~]# 
[root@kvm-07-guest03 ~]# 
[root@kvm-07-guest03 ~]# ansible-playbook test_activation_key_rhc.yaml 
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Register with activation key] **********************************************************************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************************************************************************************
ok: [localhost]

TASK [Register (using activation keys)] ******************************************************************************************************************************************************

TASK [rhel-system-roles.rhc : Set ansible_facts required by role] ****************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/set_vars.yml for localhost

TASK [rhel-system-roles.rhc : Ensure ansible_facts used by role] *****************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Check if insights-packages are installed] **********************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Handle insights unregistration] ********************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/insights-client-unregistration.yml for localhost

TASK [rhel-system-roles.rhc : Call insights status] ******************************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/check-insights-status.yml for localhost

TASK [rhel-system-roles.rhc : Call insights status] ******************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Unregister insights-client] ************************************************************************************************************************************
changed: [localhost]

TASK [rhel-system-roles.rhc : Handle system subscription] ************************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/subscription-manager.yml for localhost

TASK [rhel-system-roles.rhc : Ensure required packages are installed] ************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Get subscription status] ***************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Change rhsm.baseurl] *******************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Call subscription-manager] *************************************************************************************************************************************
changed: [localhost]

TASK [rhel-system-roles.rhc : Set the release] ***********************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Unset the release] *********************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Configure repositories] ****************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Handle insights registration] **********************************************************************************************************************************
skipping: [localhost]

PLAY RECAP ***********************************************************************************************************************************************************************************
localhost                  : ok=11   changed=2    unreachable=0    failed=0    skipped=6    rescued=0    ignored=0  
[root@kvm-07-guest03 ~]# 

>> system is registered at this point, now running the playbook again-


[root@kvm-07-guest03 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled

[root@kvm-07-guest03 ~]# 
[root@kvm-07-guest03 ~]# 
[root@kvm-07-guest03 ~]# 
[root@kvm-07-guest03 ~]# ansible-playbook test_activation_key_rhc.yaml 
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Register with activation key] **********************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************************
ok: [localhost]

TASK [Register (using activation keys)] ******************************************************************************************************************************************************

TASK [rhel-system-roles.rhc : Set ansible_facts required by role] ****************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/set_vars.yml for localhost

TASK [rhel-system-roles.rhc : Ensure ansible_facts used by role] *****************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Check if insights-packages are installed] **********************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Handle insights unregistration] ********************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/insights-client-unregistration.yml for localhost

TASK [rhel-system-roles.rhc : Call insights status] ******************************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/check-insights-status.yml for localhost

TASK [rhel-system-roles.rhc : Call insights status] ******************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Unregister insights-client] ************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Handle system subscription] ************************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/subscription-manager.yml for localhost

TASK [rhel-system-roles.rhc : Ensure required packages are installed] ************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Get subscription status] ***************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Change rhsm.baseurl] *******************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Call subscription-manager] *************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Set the release] ***********************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Unset the release] *********************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Configure repositories] ****************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Handle insights registration] **********************************************************************************************************************************
skipping: [localhost]

PLAY RECAP ***********************************************************************************************************************************************************************************
localhost                  : ok=11   changed=0    unreachable=0    failed=0    skipped=6    rescued=0    ignored=0   

[root@kvm-07-guest03 ~]# 

Successfully Verified that bug is fixed.

Comment 9 Rich Megginson 2023-06-21 23:44:29 UTC
Please mark this BZ as VERIFIED

Comment 14 errata-xmlrpc 2023-08-01 08:58:56 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 (rhel-system-roles bug fix update), 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-2023:4362


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