Bug 2044258
Summary: | Cannot select organization in GUI when registering to Satellite | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Jan Stodola <jstodola> |
Component: | anaconda | Assignee: | Martin Kolman <mkolman> |
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 9.0 | CC: | jhnidek, jkonecny, mkolman, ptoscano, redakkan, vponcova |
Target Milestone: | rc | Keywords: | Regression, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | anaconda-34.25.0.27-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-17 12:30:45 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: | 1942219 |
Description
Jan Stodola
2022-01-24 10:33:30 UTC
Thanks Jan & Martin for the details and the investigation. @Jan: one question/note so far: (In reply to Jan Stodola from comment #0) > * There is a traceback in syslog: > ... > 10:08:48,705 INFO rhsm-service:DEBUG [rhsm.connection:170] Environment variable NO_PROXY= will be used > 10:08:48,705 INFO rhsm-service:DEBUG [rhsm.connection:269] Connection built: host=XYZ.redhat.com port=443 handler=/subscription auth=basic username=test_user_multiorg > 10:08:48,705 INFO rhsm-service:DEBUG [rhsm.connection:717] Making request: GET /subscription/users/test_user_multiorg/owners > 10:08:48,712 INFO rhsm-service:DEBUG [rhsm.connection:571] Loaded CA certificates from /etc/rhsm/ca/: redhat-entitlement-authority.pem, katello-server-ca.pem, redhat-uep.pem, katello-default-ca.pem > 10:08:48,751 INFO rhsm-service:DEBUG [rhsm.connection:819] Response time: 0.021425247192382812, Smoothed response time: 0.021425247192382812 > 10:08:48,751 INFO rhsm-service:DEBUG [rhsm.connection:796] Response: status=404, request="GET /subscription/users/test_user_multiorg/owners" > [...] > In RHEL-9.0-Beta, the call is successful: > ... > 10:00:42,262 INFO rhsm-service:DEBUG [rhsm.connection:172] Environment variable NO_PROXY= will be used > 10:00:42,262 INFO rhsm-service:DEBUG [rhsm.connection:271] Connection built: host=XYZ.redhat.com port=443 handler=/rhsm auth=basic username=test_user_multiorg > 10:00:42,262 INFO rhsm-service:DEBUG [rhsm.connection:717] Making request: GET /rhsm/users/test_user_multiorg/owners > 10:00:42,268 INFO rhsm-service:DEBUG [rhsm.connection:570] Loaded CA certificates from /etc/rhsm/ca/: katello-server-ca.pem, redhat-uep.pem, katello-default-ca.pem, redhat-entitlement-authority.pem > 10:00:42,418 INFO rhsm-service:DEBUG [rhsm.connection:813] Response time: 0.02483391761779785, Smoothed response time: 0.02483391761779785 > 10:00:42,418 INFO rhsm-service:DEBUG [rhsm.connection:790] Response: status=200, request="GET /rhsm/users/test_user_multiorg/owners" Is there possibly a different configuration/setup in the two tests? The first one (RHEL 9.0) uses a /subscription handler (which is the one used for RHSM Hosted), while the second one (RHEL 9.0-beta) uses a /rhsm handler (which is used by Satellite). Could it be that somehow the 9.0 test is misconfigured, and tried to use a RHSM endpoint against Satellite? Good point, I can see that /etc/rhsm/rhsm.conf in the installation environment is not set properly and for example the prefix or baseurl config options are not set correctly in the latest RHEL-9.0 compose after an attempt to register. I will upload config files from both 9.0-Beta and latest 9.0. Martine, is it possible that the ${SATELLITE}/pub/katello-rhsm-consumer file was not executed? If I download the file from the satellite and execute it manually in the installation environment, then the prefix and baseurl options are applied correctly in /etc/rhsm/rhsm.conf Hi, The D-Bus method GetOrgs() has argument connection_options. It is dictionary and it can contain several keys ('host', 'port', 'handler', 'proxy_hostname', etc). Is it possible that this dictionary is not populated with values from anaconda dialog? I have personal repository with some testing scripts: https://github.com/jirihnidek/rhsm-dbus-examples This example could be used for this case: https://github.com/jirihnidek/rhsm-dbus-examples/blob/main/get-list-of-orgs-connection-options.sh Jiri // Update Currently this issue is being investigated by Anaconda team. We will wait for the anaconda team to finish the investigation. Based on the discussion with the team , they will let us know if they need any additional fix from subscription-manager side. (In reply to Rehana from comment #14) > // Update > > Currently this issue is being investigated by Anaconda team. We will wait > for the anaconda team to finish the investigation. Based on the discussion > with the team , they will let us know if they need any additional fix from > subscription-manager side. So after further investigation, this turns out to be an Anaconda side issue, so switching the component back to anaconda. As for what actually happens in this case: 0) username + password registration attempt to a Satellite instance is started 1) the installation environment is provisioned for the Satellite instance 2) GetOrgs() is called, the output contains more than one org 3) this raises a multiple-orgs exception (you can't register a multi-org user without specifying a single org to use) 4) this exception, like any registration time exception triggers rollback of the Satellite provisioning 5) but it also tells the GUI that the current user is a multi-org user and it needs to handle that 6) the GUI just gets the exception, so it calls GetOrgs() again, to get the organization list 7) but at this point, the system is no longer provisioned for for the Satellite instance - so the call goes out to hosted Candlepin and fails! As to why did this work on Beta and no longer works now - it looks like it was caused by fix for bug 2010865 (PR: https://github.com/rhinstaller/anaconda/pull/3651). Before that bug was fixed, we did not roll-back Satellite provisioning after a registration failure, only on explicit unregistration. Therefore, the second GetOrgs() call happened in still provisioned environment and was successful. As how to fix this - I'll have to think about it a bit, in general I think we want to get ridd of that second GetOrgs() call and forward the organization list to the GUI we get from the initial GetOrgs() call instead. The list of organizations is populated and it's possible to select and use one of them. Tested with anaconda-34.25.0.27-1.el9. Marking as Verified:Tested Checked that anaconda-34.25.0.27-1.el9 is in nightly compose RHEL-9.0.0-20220227.3 Moving to VERIFIED 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 (new packages: anaconda), 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:2326 |