Bug 767317 - subscription-manager register with activationkey returns Error Updating Data
Summary: subscription-manager register with activationkey returns Error Updating Data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 738066
TreeView+ depends on / blocked
 
Reported: 2011-12-13 19:16 UTC by Eric Sammons
Modified: 2012-06-20 13:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:04:39 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0804 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2012-06-19 19:51:31 UTC

Description Eric Sammons 2011-12-13 19:16:46 UTC
Description of problem:
Having created a activationkey in SAM I am able to successfully register and subscribe to SAM using the activationkey; however, in the process subscription-manager returns the following error:

[snip]
Error updating system data, see /var/log/rhsm/rhsm.log for more details.
[/snip]

Version-Release number of selected component (if applicable):
subscription-manager-0.96.17-1.el6.x86_64

Steps to Reproduce:
1. In SAM create a activation key, this key may be empty or contain subscriptions.

2. On the consumer, RHEL 6.2 tested, run the following command:
# subscription-manager register --org RedHat_QE --activationkey EmptyKey

3. Note the errors
  
Actual results:
The system has been registered with id: 053f938b-bb24-4710-9475-7527bfe75217 
Error updating system data, see /var/log/rhsm/rhsm.log for more details.

[rhsm.log]
2011-12-13 12:54:40,531 [DEBUG]  @connection.py:209 - Making request: PUT /headpin/api/consumers/053f938b-bb24-4710-9475-7527bfe75217/packages
2011-12-13 12:54:40,846 [DEBUG]  @connection.py:218 - Response status: 401
2011-12-13 12:54:40,847 [ERROR]  @cache.py:164 - Error updating system data
2011-12-13 12:54:40,847 [ERROR]  @cache.py:165 - Invalid credentials
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/cache.py", line 158, in update_check
    self._update_server(uep, consumer_uuid)
  File "/usr/share/rhsm/subscription_manager/cache.py", line 224, in _update_server
    self.current_profile.collect())
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 465, in updatePackageProfile
    ret = self.conn.request_put(method, pkg_dicts)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 261, in request_put
    return self._request("PUT", method, params)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 219, in _request
    self.validateResponse(result)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 239, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: Invalid credentials
2011-12-13 12:54:40,849 [ERROR]  @managercli.py:65 - exception caught in subscription-manager
2011-12-13 12:54:40,849 [ERROR]  @managercli.py:66 - Error updating system data, see /var/log/rhsm/rhsm.log for more details.
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 78, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 69, in main
    return managercli.CLI().main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1382, in main
    cmd.main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 233, in main
    self._do_command()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 627, in _do_command
    profile_mgr.update_check(admin_cp, consumer['uuid'])
  File "/usr/share/rhsm/subscription_manager/cache.py", line 212, in update_check
    return CacheManager.update_check(self, uep, consumer_uuid)
  File "/usr/share/rhsm/subscription_manager/cache.py", line 166, in update_check
    raise Exception(_("Error updating system data, see /var/log/rhsm/rhsm.log "
Exception: Error updating system data, see /var/log/rhsm/rhsm.log for more details.
[/rhsm.log]

The obvious question, given SAM's limitations why "@connection.py:209 - Making request: PUT /headpin/api/consumers/053f938b-bb24-4710-9475-7527bfe75217/packages"?  There appears to be no where in SAM to retrieve this information.

Second, note that this issue can not be reproduced on RHEL 5.8.

In SAM you will find the system is registered and subscribed; no issue.  On the client side you will find that you need to run subscription-manager refresh.

Expected results:
As a sysadmin I should not need to run subscription-manager refresh. And there should be no issue updating system data, thus no error.

Comment 6 errata-xmlrpc 2012-06-20 13:04:39 UTC
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-0804.html


Note You need to log in before you can comment on or make changes to this bug.