Bug 1054496

Summary: "Error parsing baseurl: None" and "Error parsing serverurl: None"
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkearney, ckozak, fsharath
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:51:34 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: 863175    

Description John Sefler 2014-01-16 23:14:06 UTC
Description of problem:
I am currently encountering these two error messages in stdout...
   Error parsing baseurl: None
   Error parsing serverurl: None

when I expected one of these more complete messages in stdout...
   Error parsing baseurl: Server URL has an invalid scheme. http:// and https:// are supported
   Error parsing baseurl: Server URL port could not be parsed
   Error parsing baseurl: Server URL is just a schema. Should include hostname, and/or port and path
   Error parsing baseurl: Server URL port should be numeric
   Error parsing serverurl: Server URL is just a schema. Should include hostname, and/or port and path
   Error parsing serverurl: Server URL port should be numeric
   Error parsing serverurl: Server URL port could not be parsed
   Error parsing serverurl: Server URL has an invalid scheme. http:// and https:// are supported

This is a recently introduced regression to subscription-manager master around 1/14/2014.


Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.2-1
subscription-manager: 1.10.10-1.git.22.bf03c6b.el7
python-rhsm: 1.10.10-1.git.1.90486fd.el7


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=http//hostname/prefix --force
Error parsing baseurl: None
Expected results:
Error parsing baseurl: Server URL has an invalid scheme. http:// and https:// are supported


[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=https://hostname:/prefix --force
Error parsing baseurl: None
Expected results:
Error parsing baseurl: Server URL port could not be parsed


[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=https:// --force
Error parsing baseurl: None
Expected results:
Error parsing baseurl: Server URL is just a schema. Should include hostname, and/or port and path


[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=https://hostname:PORT/prefix --force
Error parsing baseurl: None
Expected results:
Error parsing baseurl: Server URL port should be numeric


[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --serverurl=https:// --force
Error parsing serverurl: None
Expected results:
Error parsing serverurl: Server URL is just a schema. Should include hostname, and/or port and path


[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --serverurl=https://jsefler-f14-7candlepin.usersys.redhat.com:PORT/candlepin --force
Error parsing serverurl: None
Expected results:
Error parsing serverurl: Server URL port should be numeric


[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --serverurl=https://hostname:/prefix --force
Error parsing serverurl: None
Expected results:
Error parsing serverurl: Server URL port could not be parsed


[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --serverurl=https:hostname/prefix --force
Error parsing serverurl: None
Expected results:
Error parsing serverurl: Server URL has an invalid scheme. http:// and https:// are supported

Comment 2 Carter Kozak 2014-01-17 13:45:18 UTC
>[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=https://hostname:/prefix --force
?Error parsing baseurl: None
>Expected results:
>Error parsing baseurl: Server URL port could not be parsed

New expected result: 
Error parsing baseurl: Server URL port should be numeric

Same with the second to last one, except serverurl.

Comment 3 John Sefler 2014-01-17 14:38:33 UTC
*** Bug 1044686 has been marked as a duplicate of this bug. ***

Comment 4 Carter Kozak 2014-01-30 13:46:11 UTC
commit b6ed83cf11e7cc045bbb07fa1411b43eddd369e2
Author: Adrian Likins <alikins>
Date:   Tue Jan 14 12:49:54 2014 -0500

    1044686: Make serverurl parse error detailed again
    
    The detail messages are populated by the exception mapper
    now, but we need to use managerlib.handle_exception to
    use it. ServerUrlParse errors were not using it, and
    relied on the exceptions msg attribute, which is now
    None.

Comment 6 John Sefler 2014-02-01 00:37:52 UTC
Testing version...
[root@jsefler-7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.2-1
subscription-manager: 1.10.11-1.git.56.49453ff.el7
python-rhsm: 1.10.11-1.git.0.17362f9.el7

[root@jsefler-7 ~]# subscription-manager register --serverurl=hostname:PORT/prefix
Error parsing serverurl:
Server URL port should be numeric
^^^^^^
okay

[root@jsefler-7 ~]# subscription-manager register --baseurl=hostname:PORT/prefix
Error parsing baseurl:
Server URL port should be numeric
^^^^^^
not okay


I suggest removing the word "Server" from the error message.

Comment 7 Carter Kozak 2014-02-03 15:41:20 UTC
Insignificant semantics, let's leave this as is.  Would cause a few strings to be re-translated if we changed it, and the wording isn't necessarily wrong.

Comment 9 Sharath Dwaral 2014-02-07 16:18:05 UTC
Version:

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.3-1
subscription-manager: 1.10.13-1.el7
python-rhsm: 1.10.12-1.el7

Verification:

# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=http//hostname/prefix --force
Error parsing baseurl:
Server URL has an invalid scheme. http:// and https:// are supported

# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=https://hostname:/prefix --force
Error parsing baseurl:
Server URL port should be numeric

# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=https:// --force
Error parsing baseurl:
Server URL is just a schema. Should include hostname, and/or port and path

# subscription-manager register --username=testuser1 --password=password --org=admin --baseurl=https://hostname:PORT/prefix --force
Error parsing baseurl:
Server URL port should be numeric    <<<<<<<  Passing it based on comment 7

# subscription-manager register --username=testuser1 --password=password --org=admin --serverurl=https:// --force
Error parsing serverurl:
Server URL is just a schema. Should include hostname, and/or port and path

# subscription-manager register --username=testuser1 --password=password --org=admin --serverurl=https://jsefler-f14-7candlepin.usersys.redhat.com:PORT/candlepin --force
Error parsing serverurl:
Server URL port should be numeric

# subscription-manager register --username=testuser1 --password=password --org=admin --serverurl=https://hostname:/prefix --force
Error parsing serverurl:
Server URL port should be numeric

# subscription-manager register --username=testuser1 --password=password --org=admin --serverurl=https:hostname/prefix --force
Error parsing serverurl:
Server URL has an invalid scheme. http:// and https:// are supported

VERIFIED

Comment 11 Ludek Smid 2014-06-13 11:51:34 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.