Hide Forgot
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
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
*** This bug has been marked as a duplicate of bug 1054496 ***