Bug 1122991
| Summary: | trying to register using a non-existent environment/cv returns cryptic error in subscription-manager | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Corey Welton <cwelton> |
| Component: | Registration | Assignee: | Katello Bug Bin <katello-bugs> |
| Status: | CLOSED NOTABUG | QA Contact: | sthirugn <sthirugn> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.3 | CC: | sthirugn |
| Target Milestone: | Unspecified | ||
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-07-28 14:17:28 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: | |||
|
Description
Corey Welton
2014-07-24 14:29:54 UTC
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 |