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.
Bug 1044686 - Error parsing baseurl: <message> is not as informative as it used to be
Summary: Error parsing baseurl: <message> is not as informative as it used to be
Keywords:
Status: CLOSED DUPLICATE of bug 1054496
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-12-18 19:49 UTC by John Sefler
Modified: 2014-01-17 14:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-17 14:38:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2013-12-18 19:49:50 UTC
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/2e00e7331cc0dd70d6cc3174f40e33a553e326d8
https://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

Comment 2 Adrian Likins 2014-01-14 17:52:37 UTC
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

Comment 4 xingge 2014-01-17 08:08:39 UTC
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

Comment 5 John Sefler 2014-01-17 14:38:33 UTC

*** This bug has been marked as a duplicate of bug 1054496 ***


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