Description of problem: Although I suspect a valid orgKey cannot contain spaces (is this true?), the following attempt to register with an orgKey containing a space should still throw a RestlibException instead of a NetworkException... This case is blocked as expected... # subscription-manager register --username=testuser1 --password=password --org="foo_bar" Organization/Owner foo_bar does not exist. This case is blocked as not expected... # subscription-manager register --username=testuser1 --password=password --org="foo bar" Network error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information. ^^^^ EXPECTED RESULT TO BE: Organization/Owner foo bar does not exist. Version-Release number of selected component (if applicable): # rpm -q subscription-manager subscription-manager-0.96.7-1.git.10.586c3c4.el6.x86_64 [root@jsefler-onprem-62candlepin proxy]# git show-ref | grep master 517e1deb46bc6365da35ff12944815208eedb9d6 refs/heads/master 517e1deb46bc6365da35ff12944815208eedb9d6 refs/remotes/origin/master How reproducible:
I suspect the fix for this is to url encode the orgKey when calling the candlepin api. My guess is that the api path is getting assembled with the requested orgkey "foo bar" which creates an invalid http request when there is a space in the value.
Committed 78110be74fc82def8c694623af8903a282de347c in python-rhsm
Available in versions 0.98.3+
[root@jmolet-vm4 product]# subscription-manager register --user testuser1 --pass password --org="two words" Organization two words does not exist. [root@jmolet-vm4 product]# subscription-manager register --user testuser1 --pass password --org="two_words" Organization two_words does not exist. This looks like it works properly now, marking VERIFIED: [root@jmolet-vm4 product]# rhsm-version python-rhsm-0.98.3-1.git.2.74cd6bb.el5_7 subscription-manager-gnome-0.98.3-1.git.16.14460bc.el5_7 subscription-manager-firstboot-0.98.3-1.git.16.14460bc.el5_7 subscription-manager-0.98.3-1.git.16.14460bc.el5_7 candlepin version: commit 1f4169cab5617b4a3209f13a6cc0f17f6d901e6f Date: Fri Nov 11 08:15:33 2011 -0500
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No description necessary
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0154.html