Bug 2118486
| Summary: | The force option of registering through dbus python binding is ignored | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Michal Bocek <mbocek> | |
| Component: | subscription-manager | Assignee: | Jason Jerome <jajerome> | |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 8.6 | CC: | arpandey, cdonnell, redakkan, tkuratom, zpetrace | |
| Target Milestone: | rc | Keywords: | Triaged | |
| Target Release: | 8.8 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | subscription-manager-1.28.34-1.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2121350 (view as bug list) | Environment: | ||
| Last Closed: | 2023-05-16 09:07:12 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: | 2121350 | |||
|
Description
Michal Bocek
2022-08-15 22:18:12 UTC
Yes, it appears it is not actually implemented, only checked as part of the parameters in case a system is registered. Pre-verification against jenkins build of subscription-manager( subscription-manager-1.28.33+4.gca9258769-1.git.0.244bf50.x86_64 ) >> Lets reproduce the issue first- [root@sweetpig-12 ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 4.2.10-1 subscription management rules: 5.43 subscription-manager: 1.28.33-1.el8 [root@sweetpig-12 ~]# [root@sweetpig-12 ~]# 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@sweetpig-12 ~]# [root@sweetpig-12 ~]# subscription-manager identity system identity: 854a3c2f-b568-4fa1-a173-f1da3e7b6582 name: sweetpig-12.4a2m.lab.eng.bos.redhat.com org name: 13343512 org ID: 13343512 [root@sweetpig-12 ~]# [root@sweetpig-12 ~]# python3 test.py << script to use dbus python binding for rhsm Traceback (most recent call last): File "test.py", line 19, in <module> dbus_interface="com.redhat.RHSM1.Register", File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 70, in __call__ return self._proxy_method(*args, **keywords) File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 145, in __call__ **keywords) File "/usr/lib64/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: com.redhat.RHSM1.Error: {"exception": "DBusException", "severity": "error", "message": "This system is already registered"} [root@sweetpig-12 ~]# ^^^^^------ Issue reproduced, forced re-registration failed [root@sweetpig-12 ~]# ========================================================================= >> verifying on jenkins build of sub-man that has a fix: [root@sweetpig-12 ~]# [root@sweetpig-12 ~]# yum upgrade subscription-manager Updating Subscription Management repositories. Last metadata expiration check: 3:49:40 ago on Wed 30 Nov 2022 01:16:13 AM EST. Dependencies resolved. ============================================================================================================================================================================================== Package Architecture Version Repository Size ============================================================================================================================================================================================== Upgrading: dnf-plugin-subscription-manager x86_64 1.28.33+4.gca9258769-1.git.0.244bf50 rhsm_RHEL8.8 315 k python3-cloud-what x86_64 1.28.33+4.gca9258769-1.git.0.244bf50 rhsm_RHEL8.8 314 k python3-subscription-manager-rhsm x86_64 1.28.33+4.gca9258769-1.git.0.244bf50 rhsm_RHEL8.8 392 k python3-syspurpose x86_64 1.28.33+4.gca9258769-1.git.0.244bf50 rhsm_RHEL8.8 331 k subscription-manager x86_64 1.28.33+4.gca9258769-1.git.0.244bf50 rhsm_RHEL8.8 1.2 M Transaction Summary =========================================================================: : : : Installed products updated. Upgraded: dnf-plugin-subscription-manager-1.28.33+4.gca9258769-1.git.0.244bf50.x86_64 python3-cloud-what-1.28.33+4.gca9258769-1.git.0.244bf50.x86_64 python3-subscription-manager-rhsm-1.28.33+4.gca9258769-1.git.0.244bf50.x86_64 python3-syspurpose-1.28.33+4.gca9258769-1.git.0.244bf50.x86_64 subscription-manager-1.28.33+4.gca9258769-1.git.0.244bf50.x86_64 Complete! [root@sweetpig-12 ~]# [root@sweetpig-12 ~]# service rhsm restart Redirecting to /bin/systemctl restart rhsm.service [root@sweetpig-12 ~]# [root@sweetpig-12 ~]# subscription-manager identity system identity: aa942526-4fec-42aa-9516-159cb2dede17 name: sweetpig-12.4a2m.lab.eng.bos.redhat.com org name: 13343512 org ID: 13343512 [root@sweetpig-12 ~]# [root@sweetpig-12 ~]# python3 test.py [root@sweetpig-12 ~]# ^^---- script ran successfully and system re-registered with force option. [root@sweetpig-12 ~]# 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@sweetpig-12 ~]# [root@sweetpig-12 ~]# subscription-manager identity system identity: cd0a578f-ac67-4a48-8323-2ec8678f574b system identity after re-registration with force option name: sweetpig-12.4a2m.lab.eng.bos.redhat.com org name: 13343512 org ID: 13343512 [root@sweetpig-12 ~]# [root@sweetpig-12 ~]# Verified : The system is re-registered without an exception when using --force option . Final verification done on the SM version: [root@kvm-02-guest12 ~]# subscription-manager version server type: This system is currently not registered. subscription management server: 4.2.10-1 subscription management rules: 5.43 subscription-manager: 1.28.34-1.el8 [root@kvm-02-guest12 ~]# 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-02-guest12 ~]# subscription-manager identity system identity: 16aa5474-5817-4c91-8712-7aeab6d48953 name: kvm-02-guest12.rhts.eng.brq.redhat.com org name: 13281785 org ID: 13281785 -> Running a script to use dbus python binding for rhsm: [root@kvm-02-guest12 ~]# python3 script.py [root@kvm-02-guest12 ~]# [root@kvm-02-guest12 ~]# 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-02-guest12 ~]# subscription-manager identity system identity: 322af5ac-28f3-48d3-b5a7-24e6309ac686 name: kvm-02-guest12.rhts.eng.brq.redhat.com org name: 13281785 org ID: 13281785 ^^ system re-registered successfully --> Final verification PASSED 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 (subscription-manager bug fix and enhancement 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:2984 |