Bug 817671
Summary: | [RFE] Add Support for Activation Keys in GUI | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Matt Reid <mreid> | ||||
Component: | subscription-manager | Assignee: | John Sefler <jsefler> | ||||
Status: | CLOSED ERRATA | QA Contact: | Entitlement Bugs <entitlement-bugs> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.4 | CC: | alikins, awood, bgollahe, bkearney, jsefler, sforsber, skallesh | ||||
Target Milestone: | rc | Keywords: | FutureFeature | ||||
Target Release: | 6.4 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | subscription-manager-1.1.6-1 | Doc Type: | Release Note | ||||
Doc Text: |
Activation Keys Support in the GUI
The Subscription Manager graphical user interface now allows you to register a system using an activation key. Activation keys allow users to preconfigure subscriptions for a system before it is registered.
|
Story Points: | --- | ||||
Clone Of: | |||||||
: | 875220 (view as bug list) | Environment: | |||||
Last Closed: | 2013-02-21 08:54:45 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: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 771481, 875220 | ||||||
Attachments: |
|
Description
Matt Reid
2012-04-30 20:10:48 UTC
commit 6a138541765106e1d9d4839d24da230fbc3810c0 Author: Alex Wood <awood> AuthorDate: Fri Oct 5 17:52:31 2012 -0400 Commit: Alex Wood <awood> CommitDate: Wed Oct 17 13:36:34 2012 -0400 817671: Add support for Activation Keys in the GUI. Please note that the activation key path does not auto-subscribe the user. It merely registers them. The current implementation doesn't pay any attention to subscriptions that are configured as part of the given activation key. I think the CLI functions how this should, where if you register with an activation key, after registration, you will have subscriptions attached (as defined by that activation key). Registering with the same activation key through the GUI, they'll be registered, but there won't be any subscriptions attached, even if the activation key includes a subscription. We shouldn't do an auto-subscribe as part of this, but if there are any subscriptions that are part of the activation key being used, we should attach those. Let me know if there are any questions. Looks like you can get subscription manager into a weird state if you register without an activation key, unregister, and then register with an activation key (all without closing subscription manager gui). When I did this, I used the same orgs and envs as the activation key was going to use later, but not sure if that's important or not. If you do all that, you'll get blocked from registering with the activation key through the GUI (CLI still works), but GUI errors out no matter what you put in as information, saying you gave invalid credentials. Closing and reopening subscription manager seems to get it sorted out. 2012-10-25 13:55:14,241 [DEBUG] @connection.py:165 - ContectConnection 2012-10-25 13:55:16,706 [INFO] @connection.py:519 - Using no auth 2012-10-25 13:55:16,706 [INFO] @connection.py:522 - Connection Built: host: sam-12.usersys.redhat.com, port: 443, handler: /sam/api 2012-10-25 13:55:16,706 [INFO] @registergui.py:322 - Registering to owner: ACME_Corporation environment: 3 2012-10-25 13:55:17,629 [DEBUG] @connection.py:355 - Making request: POST /sam/api/environments/3/consumers 2012-10-25 13:55:17,702 [DEBUG] @connection.py:368 - Response status: 401 2012-10-25 13:55:17,702 [ERROR] @utils.py:56 - Invalid credentials Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/gui/registergui.py", line 308, in _on_registration_finished_cb raise error RestlibException: Invalid credentials 2012-10-25 13:55:17,720 [DEBUG] @managergui.py:304 - Registration changed, updating main window. This probably isn't something that would happen very often, but its odd that it can happen. If you register with an activation key through the GUI, and then auto-subscribe after, a few strange things happen. First, it complains about not having the subscriptions and service levels to complete autosubscription, yet it attaches a subscription and turns my system from red to green. If you close out that error dialog and then try to open the Preferences dialog to see if there's an SLA pref set, you get a network error and we can't show the dialog. You get a network error trying to open the Preferences dialog or trying to run sub-man release --list. Sub-man service-level --list works, and --show works for release and service-level. According to the output, there's no service level preference set. See pastebin.test.redhat.com/112845 for rhsm.log info I'm guessing it won't be possible (or at least it will be more difficult) to hit this once we get activation keys through the gui updated per comment 4, but maybe it's still worth looking into/preventing? Pasting in log referenced in comment 6. 2012-10-25 15:34:29,051 [DEBUG] @connection.py:213 - Loading CA certificate: '/etc/pki/entitlement/6470527825162651471.pem' 2012-10-25 15:34:29,111 [ERROR] @utils.py:56 - (-2, 'Name or service not known') Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/gui/managergui.py", line 366, in _preferences_item_clicked self.preferences_dialog.show() File "/usr/share/rhsm/subscription_manager/gui/preferences.py", line 155, in show self.load_current_settings() File "/usr/share/rhsm/subscription_manager/gui/preferences.py", line 79, in load_current_settings self.load_releases(consumer_json) File "/usr/share/rhsm/subscription_manager/gui/preferences.py", line 113, in load_releases available_releases = self.release_backend.get_releases() File "/usr/share/rhsm/subscription_manager/release.py", line 98, in get_releases data = self.content_connection.get_versions(listing_path) File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 231, in get_versions results = self._request("GET", handler, body="") File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 199, in _request conn.request("GET", handler, body="", headers={"Host": "%s:%s" % (self.host, self.ssl_port), "Content-Length": "0"}) File "/usr/lib64/python2.4/httplib.py", line 810, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request self.endheaders() File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders self._send_output() File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output self.send(msg) File "/usr/lib64/python2.4/httplib.py", line 652, in send self.connect() File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 49, in connect for (family, _, _, _, _) in \ gaierror: (-2, 'Name or service not known') Comment 7 is the second error encountered (the network error), it might depend on the first piece that occurs when you auto-subscribe after using a key. Both are in the pastebin url from comment 6, but may as well add it directly here for convenience. This is the part that shows when you autosubscribe after registering with the activation key through the gui. 2012-10-25 15:34:22,675 [INFO] @cache.py:160 - Checking current system info against cache: /var/lib/rhsm/facts/facts.json 2012-10-25 15:34:22,676 [INFO] @cache.py:162 - System data has changed, updating server. 2012-10-25 15:34:22,676 [DEBUG] @facts.py:148 - Updating facts on server 2012-10-25 15:34:22,676 [DEBUG] @connection.py:355 - Making request: PUT /sam/api/consumers/ebaa2365-4e77-4e83-9375-58ecdd22b504 2012-10-25 15:34:23,205 [DEBUG] @connection.py:368 - Response status: 200 2012-10-25 15:34:23,228 [DEBUG] @connection.py:355 - Making request: GET /sam/api/ 2012-10-25 15:34:23,276 [DEBUG] @connection.py:368 - Response status: 200 2012-10-25 15:34:23,276 [DEBUG] @connection.py:539 - Server supports the following resources: 2012-10-25 15:34:23,276 [DEBUG] @connection.py:540 - {'organizations': '/api/organizations/', 'users': '/api/users/', 'roles': '/api/roles/', 'providers': '/api/providers/', 'environments': '/api/environments/', 'entitlements': '/api/entitlements/', 'systems': '/api/systems/', 'activation_keys': '/api/activation_keys/', 'consumers': '/api/consumers/'} 2012-10-25 15:34:23,276 [INFO] @cache.py:215 - Server does not support packages, skipping profile upload. 2012-10-25 15:34:23,278 [INFO] @cache.py:160 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json 2012-10-25 15:34:23,278 [INFO] @cache.py:175 - No changes. 2012-10-25 15:34:23,278 [DEBUG] @connection.py:355 - Making request: GET /sam/api/consumers/ebaa2365-4e77-4e83-9375-58ecdd22b504/entitlements/dry-run?service_level=Self-support 2012-10-25 15:34:23,402 [DEBUG] @connection.py:368 - Response status: 200 2012-10-25 15:34:23,402 [DEBUG] @autobind.py:50 - Unentitled products: set(['69']) 2012-10-25 15:34:23,402 [DEBUG] @autobind.py:58 - Autobind would give access to: set([]) 2012-10-25 15:34:23,402 [DEBUG] @autobind.py:63 - Service level does not cover required products: Self-support 2012-10-25 15:34:23,403 [DEBUG] @connection.py:355 - Making request: GET /sam/api/consumers/ebaa2365-4e77-4e83-9375-58ecdd22b504/entitlements/dry-run?service_level=Standard 2012-10-25 15:34:23,645 [DEBUG] @connection.py:368 - Response status: 200 2012-10-25 15:34:23,645 [DEBUG] @autobind.py:50 - Unentitled products: set(['69']) 2012-10-25 15:34:23,645 [DEBUG] @autobind.py:58 - Autobind would give access to: set([]) 2012-10-25 15:34:23,645 [DEBUG] @autobind.py:63 - Service level does not cover required products: Standard 2012-10-25 15:34:23,646 [INFO] @registergui.py:513 - No suitable service levels found. 2012-10-25 15:34:23,646 [ERROR] @utils.py:56 - None Traceback (most recent call last): File "/usr/sbin/subscription-manager-gui", line 48, in ? from dbus.bus import REQUEST_NAME_REPLY_PRIMARY_OWNER ImportError: No module named bus I bet you have to switch the connection at some point. We should ensure the subscirptions come down. The issue described in comment 5 is fixed with commit 94c4519086103c658b3d1a69c97759e443391c4d The issue described in comment 4 is fixed: commit a3506937104f5b7e807dc9a154e0479bae9c8947 Author: Alex Wood <awood> AuthorDate: Thu Nov 1 14:01:51 2012 -0400 Commit: Alex Wood <awood> CommitDate: Thu Nov 1 14:02:43 2012 -0400 Attach subscriptions after registration with an activation key. Available in subscription-manager-1.1.6-1+ *** Bug 871016 has been marked as a duplicate of this bug. *** I split out comments 6-8 into a new bug at https://bugzilla.redhat.com/show_bug.cgi?id=875220 comments up through 5 seem fixed now, so moving to modified Created attachment 672107 [details]
registering with an activation key from the subscription-manager-gui and firstboot
[root@jsefler-6 ~]# rpm -q subscription-manager-gui subscription-manager-firstboot
subscription-manager-gui-1.1.18-1.el6.x86_64
subscription-manager-firstboot-1.1.18-1.el6.x86_64
Registering with an activation key from both firstboot and subscription-manager-gui have been implemented. This is enough to verify this RFE bugzilla. Problems encoutered with the testing of this new feature should be opened under seperate individual bugzillas.
Moving this bugzilla to VERIFIED.
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-2013-0350.html |