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:


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.