Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
The following commits appear to have changed the logic for rendering error messages to the user when parsing a bad --baseurl value.
https://github.com/candlepin/subscription-manager/commit/2e00e7331cc0dd70d6cc3174f40e33a553e326d8https://github.com/candlepin/python-rhsm/commit/4dfd2dd407193b98192b9eb6fc396275295ee93a
I believe the user experience should remain unchanged, but something is preventing the parse error messages from rendering as expected.
See the steps to reproduce...
Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.1-1
subscription-manager: 1.10.9-1.git.1.ebf6be6.el7
python-rhsm: 1.10.9-1.git.0.e05ee04.el7
How reproducible:
Steps to Reproduce:
The following cases (from rhel7) show the results as "None"...
[root@jsefler-7 ~]# subscription-manager register --baseurl=http://
Error parsing baseurl: None
[root@jsefler-7 ~]# subscription-manager register --baseurl=https://hostname:PORT/prefix
Error parsing baseurl: None
[root@jsefler-7 ~]# subscription-manager register --baseurl=https://hostname:/prefix
Error parsing baseurl: None
[root@jsefler-7 ~]# subscription-manager register --baseurl=https:/hostname
Error parsing baseurl: None
For comparison, the same cases (from rhel6) show the expected results...
[root@jsefler-6 ~]# subscription-manager register --baseurl=http://
Error parsing baseurl: Server URL is just a schema. Should include hostname, and/or port and path
[root@jsefler-6 ~]# subscription-manager register --baseurl=https://hostname:PORT/prefix
Error parsing baseurl: Server URL port should be numeric
[root@jsefler-6 ~]# subscription-manager register --baseurl=https://hostname:/prefix
Error parsing baseurl: Server URL port could not be parsed
[root@jsefler-6 ~]# subscription-manager register --baseurl=https:/hostname
Error parsing baseurl: Server URL has an invalid scheme. http:// and https:// are supported
Looks like the cli code was relying on the msg in the exception, and not using the cli handle_exception code. the handle_exception is what ends up populating the error message now.
pr at:
https://github.com/candlepin/subscription-manager/pull/857
Now the subscription-manager looks like will ignore the baseurl option when it is not right? I meet some very strange cases.
[root@dhcp-13-183 ~]# subscription-manager register --baseurl=https://hostname
This system is already registered. Use --force to override
[root@dhcp-13-183 ~]# subscription-manager register --baseurl=www.baidu.com --force
The system with UUID 1add5159-32d8-4300-84a2-e39b2cca29bb has been unregistered
Username: rhel7beta
Password:
The system has been registered with ID: 80a49b59-84bd-4f85-90de-4e23fa963bee
[root@dhcp-13-183 ~]# subscription-manager register --baseurl=https://hostname:PORT
Error parsing baseurl: None