Description of problem: When a user tries to register to a sat6 instance, pointing to a non-existent env/cv, an error is thrown that makes no sense to user. I am not sure if this is a sub-man issue, sat, or both Version-Release number of selected component (if applicable): Satellite-6.0.4-RHEL-6-20140723.0 How reproducible: Steps to Reproduce: 1. Try and register a client to your system, using an environment/cv combination that does not exist, i.e. subscription-manager register --username admin --password yK75VcevtxLyEnuZ --org Default_Organization --environment dev/mycv --auto-attach --force 2. view results Actual results: [root@qeblade6 ~]# subscription-manager register --username admin --password yK75VcevtxLyEnuZ --org Default_Organization --environment dev/mycv --auto-attach --force 'exceptions.ValueError' object has no attribute 'msg' Expected results: Something that makes more sense to user. Additional info:
subscription management server: 1.5.0-27.el6sat-Katello subscription-manager: 1.9.11-1.el6 python-rhsm: 1.9.6-1.el6
Relevant rhsm.log snippet 2014-07-24 10:22:09,567 [DEBUG] @connection.py:441 - Making request: GET /katello/api/owners/Default_Organization/environments?name=dev%2Fmycv 2014-07-24 10:22:09,668 [DEBUG] @connection.py:460 - Response status: 404 2014-07-24 10:22:09,669 [ERROR] @connection.py:489 - Response: 404 2014-07-24 10:22:09,670 [ERROR] @managercli.py:151 - Error during registration: 'exceptions.ValueError' object has no attribute 'msg' 2014-07-24 10:22:09,670 [ERROR] @managercli.py:152 - 'exceptions.ValueError' object has no attribute 'msg' Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/managercli.py", line 1048, in _do_command self.options.environment) File "/usr/share/rhsm/subscription_manager/managercli.py", line 1134, in _get_environment_id env = cp.getEnvironment(owner_key=owner_key, name=environment_name) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 1029, in getEnvironment results = self.conn.request_get(url) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 541, in request_get return self._request("GET", method) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request self.validateResponse(result, request_type, handler) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 490, in validateResponse log.error("JSON parsing error: %s" % e.msg) AttributeError: 'exceptions.ValueError' object has no attribute 'msg'
The error message was caused by an other bug - https://bugzilla.redhat.com/show_bug.cgi?id=1123514 Using invalid env/cv shows a valid error message: # subscription-manager register --username='admin' --password='changeme' --org='rhcorp' --environment='a/b' --autosubscribe No such environment: a/b # subscription-manager register --username='admin' --password='changeme' --org='rhcorp' --environment='DEV/cv1' --autosubscribe The system has been registered with ID: e84c386b-aa2b-47d6-a117-09fd66b37c72 Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed