Bug 2100467

Summary: System registration via GUI with activation keys fails with "Unknown arguments: dict_keys(['enable_content'])"
Product: Red Hat Enterprise Linux 9 Reporter: Peter Stone <fedora-topics-562353>
Component: gnome-settings-daemonAssignee: Kalev Lember <klember>
Status: CLOSED ERRATA QA Contact: Tomas Pelka <tpelka>
Severity: low Docs Contact: Marek Suchánek <msuchane>
Priority: unspecified    
Version: 9.0CC: feborges, ptoscano, rstrode, tpelka, tpopela
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: gnome-settings-daemon-40.0.1-8.el9 Doc Type: Bug Fix
Doc Text:
.Subscription enrolling with Activation keys has been fixed Previously, you could not enroll your Red Hat subscription in *Settings* using Activation keys. *Settings* displayed the following error after pressing btn:[Register]: ---- Failed to register system; Failed to RegisterWithActivationKeys: Unknown arguments: dict_keys(['enable_content']) ---- With this update, the problem has been fixed, and you can now enroll your subscription using Activation keys as expected in *Settings*.
Story Points: ---
Clone Of:
: 2113960 (view as bug list) Environment:
Last Closed: 2022-11-15 10:37:59 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: 2113960    
Attachments:
Description Flags
message after boot
none
click on Subscription
none
write activation key and org ID then press Register
none
get this error message after pressing Register none

Description Peter Stone 2022-06-23 12:54:51 UTC
Description of problem: GUI-based method of system registration doesn't work on RHEL 9.


Version-Release number of selected component (if applicable):
$ sudo subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.22-1
subscription management rules: 5.41
subscription-manager: 1.29.26-3.el9_0



How reproducible:


Steps to Reproduce:
1. Install RHEL 9 from GA image, using "Server with GUI" profile, without registering the system during install.
2. After the installation and first boot, one is prompted to register the system.
3. Go to Settings->About->Subscription. Choose Registration server: Red Hat, Registration type: Activation keys. Input correct activation key and organization ID. Press Register.

Actual results: Error message pops up: Failed to register system; Failed to RegisterWithActivationKeys: Unknown arguments: dict_keys(['enable_content'])


Expected results: system should register.


Additional info: As a workaround, the CLI method (# subscription-manager register --org=ORG ID --activationkey= Key Name from https://access.redhat.com/solutions/3341191) with activation key and organization ID works.


journalctl entries:

hostname systemd[1]: Started RHSM dbus service.
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:165] Could not import locale for C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:135] Could not import locale either for C.UTF-8_C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:165] Could not import locale for C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:135] Could not import locale either for C.UTF-8_C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:165] Could not import locale for C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:135] Could not import locale either for C.UTF-8_C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:165] Could not import locale for C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:135] Could not import locale either for C.UTF-8_C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]: ERROR [syspurpose.files:108] Unable to read file /etc/rhsm/syspurpose/syspurpose.json: [Errno 2] No such file or directory: '/etc/rhsm/syspurpose/syspurpose.j
son'
hostname vmtoolsd[5718]: gtk_disable_setlocale() must be called before gtk_init()
hostname systemd[5264]: Started GNOME subscription management service.
hostname systemd[5264]: Reached target GNOME subscription management target.

hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:165] Could not import locale for C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:135] Could not import locale either for C.UTF-8_C.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname pkexec[6252]: pam_unix(polkit-1:session): session opened for user root(uid=0) by (uid=1000)
hostname pkexec[6252]: test: Executing command [USER=root] [TTY=unknown] [CWD=/home/user] [COMMAND=/usr/libexec/gsd-subman-helper --kind register-with-key --address unix:abstract=/run/dbus-An08zl1K3h,guid={GUID} --hostname subscription.rhsm.redhat.com --organisation {ORG_ID}]
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:165] Could not import locale for en_US.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:135] Could not import locale either for en_EN.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]: ERROR [rhsmlib.dbus.util:72] This object requires the consumer to be registered before it can be used.
hostname rhsm-service[5878]: Traceback (most recent call last):
hostname rhsm-service[5878]:   File "/usr/lib64/python3.9/site-packages/rhsmlib/dbus/util.py", line 70, in dbus_handle_exceptions
hostname rhsm-service[5878]:     return func(*args, **kwargs)
hostname rhsm-service[5878]:   File "/usr/lib64/python3.9/site-packages/rhsmlib/dbus/objects/unregister.py", line 64, in Unregister
hostname rhsm-service[5878]:     self.ensure_registered()
hostname rhsm-service[5878]:   File "/usr/lib64/python3.9/site-packages/rhsmlib/dbus/base_object.py", line 62, in ensure_registered
hostname rhsm-service[5878]:     raise dbus.DBusException(
hostname rhsm-service[5878]: dbus.exceptions.DBusException: This object requires the consumer to be registered before it can be used.
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:165] Could not import locale for en_US.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]:  INFO [subscription_manager.i18n:135] Could not import locale either for en_EN.UTF-8: [Errno 2] No translation file found for domain: 'rhsm'
hostname rhsm-service[5878]: ERROR [rhsmlib.dbus.util:72] Unknown arguments: dict_keys(['enable_content'])
hostname rhsm-service[5878]: Traceback (most recent call last):
hostname rhsm-service[5878]:   File "/usr/lib64/python3.9/site-packages/rhsmlib/dbus/util.py", line 70, in dbus_handle_exceptions
hostname rhsm-service[5878]:     return func(*args, **kwargs)
hostname rhsm-service[5878]:   File "/usr/lib64/python3.9/site-packages/rhsmlib/dbus/objects/register.py", line 338, in RegisterWithActivationKeys
hostname rhsm-service[5878]:     consumer = register_service.register(org, **options)
hostname rhsm-service[5878]:   File "/usr/lib64/python3.9/site-packages/rhsmlib/services/register.py", line 43, in register
hostname rhsm-service[5878]:     raise exceptions.ValidationError(_("Unknown arguments: %s") % kwargs.keys())
hostname rhsm-service[5878]: rhsmlib.services.exceptions.ValidationError: Unknown arguments: dict_keys(['enable_content'])

Comment 1 Pino Toscano 2022-06-28 10:09:26 UTC
Hello Peter,

thanks for filing this bug for us.

Can you please clarify what is the UI being used for the registration after the installation?
The context here is that subscription-manager used to provide a page in the "Initial setup" wizard that appears when you graphically log in to RHEL for the first time after the installation. We stopped providing that page in RHEL 9, so I'm surprised you get something like that (and we did not have internal reports about this either).

If possible, can you please attach screenshot(s) of what you get?

Thanks in advance!

Comment 2 Peter Stone 2022-06-28 12:15:16 UTC
Created attachment 1893172 [details]
message after boot

Comment 3 Peter Stone 2022-06-28 12:15:43 UTC
Created attachment 1893173 [details]
click on Subscription

Comment 4 Peter Stone 2022-06-28 12:16:22 UTC
Created attachment 1893174 [details]
write activation key and org ID then press Register

Comment 5 Peter Stone 2022-06-28 12:16:49 UTC
Created attachment 1893175 [details]
get this error message after pressing Register

Comment 6 Peter Stone 2022-06-28 12:18:26 UTC
@ptoscano I used the graphical UI via the GNOME Settings app to try to register the system.

Screenshots with steps are attached.

Comment 7 Pino Toscano 2022-07-12 12:50:43 UTC
I had a chat with Felipe Borges from the Desktop Team (that maintains the GNOME integration for Subscriptions).

It seems that the gnome-settings-daemon plugin adds "enable_content" as option for both the "Register" and "RegisterWithActivationKeys" D-Bus methods. The "enable_content" option is used to also attach the content after the registration (as the name says, "enable the content/repositories"). It is useful only when registering with means different than activation keys (e.g. username & password), as activation keys have already an attribute that specifies whether perform this automatic content enablement upon successful registration. There was a request to make "enable_content" usable with "RegisterWithActivationKeys" as well, however it was rejected: bug 2059447.

Because of this, I'm reassigning the bug to gnome-settings-daemon, to make sure "enable_content" is used as option only when registering using "Register".

Comment 19 errata-xmlrpc 2022-11-15 10:37:59 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 (gtk4 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-2022:8218