Hide Forgot
Description of problem: RHEL 6.6 beta subscription-manager-1.12.10-1.el6.x86_64 subscription-manager register --org ACME --activationkey ak-test hits /owner/$id/environments w/o credentials Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
note that sub-man should not even hit /owner/$id/environments when using an activation key
commit 55bce8772ec6917d9174f50687ccc817953c4e75 Author: ckozak <ckozak@redhat.com> Date: Tue Aug 12 10:48:08 2014 -0400 1129480: don't query envs when actkey is given
Reproducing the failure with version (and rhsm.conf properly configured to connect to a Satellite 6 server).... [root@jsefler-6 ~]# subscription-manager version server type: This system is currently not registered. subscription management server: 1.5.0-30.el6sat-Katello subscription management rules: 5.11 subscription-manager: 1.12.10-1.el6 python-rhsm: 1.12.5-1.el6 [root@jsefler-6 ~]# subscription-manager register --org="Default_Organization" --activationkey="ak-rhel-6-x86_64" [root@jsefler-6 ~]# ^^ FAILURE: expected feedback stating a successful registration and attached subscriptions from the valid org and activationkey [root@jsefler-6 ~]# tail -f /var/log/rhsm/rhsm.log 2014-09-09 11:42:12,218 [DEBUG] subscription-manager @connection.py:414 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, redhat-uep.pem, candlepin-local.pem, katello-server-ca.pem, jsefler-f14-candlepin.pem 2014-09-09 11:42:12,219 [DEBUG] subscription-manager @connection.py:446 - Making request: GET /rhsm/owners/Default_Organization/environments 2014-09-09 11:42:12,328 [DEBUG] subscription-manager @connection.py:469 - Response: status=401 2014-09-09 11:42:12,332 [ERROR] subscription-manager @managercli.py:1049 - Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/managercli.py", line 1038, in _do_command self.options.environment) File "/usr/share/rhsm/subscription_manager/managercli.py", line 1133, in _get_environment_id env_list = cp.getEnvironmentList(owner_key) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 1095, in getEnvironmentList results = self.conn.request_get(method) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 550, in request_get return self._request("GET", method) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 478, in _request self.validateResponse(result, request_type, handler) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 520, in validateResponse raise RestlibException(response['status'], error_msg) RestlibException CONFIRMED: The original failure is reproducable Now let's verify the fix in the next comment with a corrected version of subscription-manager package...
Verifying Version... [root@jsefler-6 ~]# subscription-manager version server type: This system is currently not registered. subscription management server: 1.5.0-30.el6sat-Katello subscription management rules: 5.11 subscription-manager: 1.12.14-5.el6 python-rhsm: 1.12.5-1.el6 [root@jsefler-6 ~]# subscription-manager register --org="Default_Organization" --activationkey="ak-rhel-6-x86_64" The system has been registered with ID: ed20d688-9f31-42f0-8c97-2424ebb1b259 Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed [root@jsefler-6 ~]# subscription-manager identity system identity: ed20d688-9f31-42f0-8c97-2424ebb1b259 name: jsefler-6.usersys.redhat.com org name: Default_Organization org ID: Default_Organization environment name: DEV/RHEL_6_x86_64 [root@jsefler-6 ~]# subscription-manager list --consumed | grep "Subscription Name:" Subscription Name: Red Hat Employee Subscription Subscription Name: Agent Subscription Name: Forge NOTE: The three subscriptions attached came from the activationkey that was created during the setup of the Satellite 6 server (details not shown). VERIFIED: register with activationkey successfully attaches expected subscription from the activation key and registers to the expected org and environment.
Additional Sanity Testing.... Let's also verify that we can still register to the org and environment without the activationkey... [root@jsefler-6 ~]# subscription-manager unregister System has been unregistered. [root@jsefler-6 ~]# subscription-manager register Username: admin Password: Environment: DEV/RHEL_6_x86_64 The system has been registered with ID: 6824827c-8e7b-441b-b7d9-7e50094c8de6 [root@jsefler-6 ~]# [root@jsefler-6 ~]# subscription-manager identity system identity: 6824827c-8e7b-441b-b7d9-7e50094c8de6 name: jsefler-6.usersys.redhat.com org name: Default_Organization org ID: Default_Organization environment name: DEV/RHEL_6_x86_64 [root@jsefler-6 ~]# VERIFIED: Notice that we were not prompted for an org (because there is only one) while we were prompted for an environment (because there are more than one). [root@jsefler-6 ~]# subscription-manager orgs Username: admin Password: +-------------------------------------------+ admin Organizations +-------------------------------------------+ Name: Default_Organization Key: Default_Organization [root@jsefler-6 ~]# subscription-manager environments Username: admin Password: Organization: Default_Organization +-------------------------------------------+ Environments +-------------------------------------------+ Name: DEV/RHEL_7_x86_64 Description: Name: Library/RHEL_7_x86_64 Description: Name: DEV/RHEL_6_i386 Description: Name: Library/RHEL_6_i386 Description: Name: DEV/RHEL_6_x86_64 Description: Name: Library/RHEL_6_x86_64 Description: Name: Library Description: [root@jsefler-6 ~]#
*** Bug 1129454 has been marked as a duplicate of this bug. ***
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-2014-1384.html