Bug 1120576
Summary: | "subscription-manager version" can not display values for subscription management server and rules | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | qianzhan |
Component: | API | Assignee: | Bryan Kearney <bkearney> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Jitendra Yejare <jyejare> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.0 | CC: | bkearney, crog, dgoodwin, dlah, gxing, ldai, liliu, qianzhan, shihliu, wpoteat |
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-12-11 19:22:16 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: | 971511, 1005618 |
Description
qianzhan
2014-07-17 08:09:47 UTC
1. When open subscription-manager-gui ==> Help ==> About, the rhsm.log reports: 2014-08-05 07:25:02,473 [DEBUG] subscription-manager-gui @connection.py:414 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-local.pem, candlepin-stage.pem, redhat-uep.pem 2014-08-05 07:25:02,474 [DEBUG] subscription-manager-gui @connection.py:446 - Making request: GET /sam/api/status 2014-08-05 07:25:02,507 [DEBUG] subscription-manager-gui @connection.py:469 - Response: status=200 2014-08-05 07:25:02,508 [WARNING] subscription-manager-gui @connection.py:473 - Clock skew detected, please check your system time 2014-08-05 07:25:02,510 [ERROR] subscription-manager-gui @utils.py:262 - Error while checking server version: 'rulesVersion' 2014-08-05 07:25:02,510 [ERROR] subscription-manager-gui @utils.py:264 - 'rulesVersion' Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/utils.py", line 246, in get_server_versions rules_version = status['rulesVersion'] KeyError: 'rulesVersion' 2. The same error happens in rhsm.log when run "subscription-manager version": 2014-08-05 07:26:10,055 [DEBUG] subscription-manager @plugins.py:569 - loaded plugin modules: [] 2014-08-05 07:26:10,055 [DEBUG] subscription-manager @plugins.py:570 - loaded plugins: {} 2014-08-05 07:26:10,055 [DEBUG] subscription-manager @identity.py:131 - Loading consumer info from identity certificates. 2014-08-05 07:26:10,084 [DEBUG] subscription-manager @profile.py:97 - Loading current RPM profile. 2014-08-05 07:26:10,169 [INFO] subscription-manager @managercli.py:298 - Client Versions: {'python-rhsm': '1.12.5-1.el6', 'subscription-manager': '1.12.10-1.el6'} 2014-08-05 07:26:10,169 [INFO] subscription-manager @connection.py:659 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False 2014-08-05 07:26:10,169 [INFO] subscription-manager @connection.py:670 - Connection Built: host: samserv.redhat.com, port: 443, handler: /sam/api 2014-08-05 07:26:10,170 [INFO] subscription-manager @connection.py:666 - Using no auth 2014-08-05 07:26:10,170 [INFO] subscription-manager @connection.py:670 - Connection Built: host: samserv.redhat.com, port: 443, handler: /sam/api 2014-08-05 07:26:10,181 [DEBUG] subscription-manager @connection.py:414 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-local.pem, candlepin-stage.pem, redhat-uep.pem 2014-08-05 07:26:10,181 [DEBUG] subscription-manager @connection.py:446 - Making request: GET /sam/api/ 2014-08-05 07:26:10,232 [DEBUG] subscription-manager @connection.py:469 - Response: status=200 2014-08-05 07:26:10,233 [WARNING] subscription-manager @connection.py:473 - Clock skew detected, please check your system time 2014-08-05 07:26:10,235 [DEBUG] subscription-manager @connection.py:686 - Server supports the following resources: 2014-08-05 07:26:10,235 [DEBUG] subscription-manager @connection.py:687 - {'status': '/api/status/', 'organizations': '/api/organizations/', 'roles': '/api/roles/', 'sync_plans': '/api/sync_plans/', 'users': '/api/users/', 'distributors': '/api/distributors/', 'providers': '/api/providers/', 'entitlements': '/api/entitlements/', 'content_overrides': '/api/content_overrides', 'content_views': '/api/content_views/', 'guestids': '/api/guestids', 'system_groups': '/api/system_groups/', 'products': '/api/products/', 'systems': '/api/systems/', 'activation_keys': '/api/activation_keys/', 'content_view_definitions': '/api/content_view_definitions/', 'consumers': '/api/consumers/'} 2014-08-05 07:26:10,236 [DEBUG] subscription-manager @connection.py:414 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-local.pem, candlepin-stage.pem, redhat-uep.pem 2014-08-05 07:26:10,236 [DEBUG] subscription-manager @connection.py:446 - Making request: GET /sam/api/status 2014-08-05 07:26:10,260 [DEBUG] subscription-manager @connection.py:469 - Response: status=200 2014-08-05 07:26:10,261 [WARNING] subscription-manager @connection.py:473 - Clock skew detected, please check your system time 2014-08-05 07:26:10,261 [ERROR] subscription-manager @utils.py:262 - Error while checking server version: 'rulesVersion' 2014-08-05 07:26:10,261 [ERROR] subscription-manager @utils.py:264 - 'rulesVersion' Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/utils.py", line 246, in get_server_versions rules_version = status['rulesVersion'] KeyError: 'rulesVersion' 2014-08-05 07:26:10,262 [INFO] subscription-manager @managercli.py:309 - Server Versions: {'rules-version': 'Unknown', 'candlepin': 'Unknown', 'server-type': 'Red Hat Subscription Management'} On RHEL-6.6-20140826.0 against SAM-1.4.1-RHEL-6.6-20140804.0, the value of rules is still not displayed: [root@dhcp-15-25 ~]# subscription-manager register --auto-attach Username: admin Password: The system has been registered with ID: aa60a77b-bd06-4d0b-9a23-e43df1e37605 Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed [root@dhcp-15-25 ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 1.4.3.26-1.el6sam_splice-Headpin subscription management rules: Unknown subscription-manager: 1.12.13-1.el6 python-rhsm: 1.12.5-1.el6 commit 30401f6584102892b06cfc74a2eae39705c6ef33 Merge: 1e307d9 6832d57 Author: Adrian Likins <alikins> Date: Tue Oct 14 17:13:30 2014 -0400 Merge pull request #1033 from candlepin/crog/1120576 1120576: Added additional testing of version parsing Some additional notes from my git commit: It looks like the root problem exists outside the scope of subman and/or has been handled by a prior update. From what I can tell, the version info is just passed through as it is received from the server. That said, aside from doing things which don't seem very "pythonic" (ie: type checking), there's not a whole lot more we can do to catch bad data being sent by the server. In any event, I've added additional tests which should test any type reasonable to see in a JSON blob. The version concatenation will still throw an exception, but it's already being explicitly handled/expected and logged and is doing so by design. Bug still exist in RHEL7.1: SAM server: candlepin-0.9.6.5-1.el6sam.noarch candlepin-scl-1-5.el6_4.noarch candlepin-scl-quartz-2.1.5-5.el6_4.noarch candlepin-scl-rhino-1.7R3-1.el6_4.noarch candlepin-scl-runtime-1-5.el6_4.noarch candlepin-selinux-0.9.6.5-1.el6sam.noarch candlepin-tomcat6-0.9.6.5-1.el6sam.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-certs-tools-1.4.2-2.el6sat.noarch katello-cli-1.4.3.1-1.el6sam.noarch katello-cli-common-1.4.3.1-1.el6sam.noarch katello-common-1.4.3.28-1.el6sam_splice.noarch katello-configure-1.4.5.1-3.el6sam.noarch katello-glue-candlepin-1.4.3.28-1.el6sam_splice.noarch katello-glue-elasticsearch-1.4.3.28-1.el6sam_splice.noarch katello-headpin-1.4.3.28-1.el6sam_splice.noarch katello-headpin-all-1.4.3.28-1.el6sam_splice.noarch katello-selinux-1.4.4-2.el6sat.noarch ruby193-rubygem-katello-redhat-access-engine-0.0.1-1.el6sam.noarch thumbslug-0.0.40-1.el6sam.noarch thumbslug-selinux-0.0.40-1.el6sam.noarch Client: subscription-manager: 1.13.5-1.el7 python-rhsm: 1.13.5-1.el7 [root@dhcp-128-22 ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 1.4.3.28-1.el6sam_splice-Headpin subscription management rules: Unknown subscription-manager: 1.13.5-1.el7 python-rhsm: 1.13.5-1.el7 (In reply to Chris Rog from comment #4) > Some additional notes from my git commit: > > It looks like the root problem exists outside the scope of subman and/or has > been handled by a prior update. From what I can tell, the version info is > just passed through as it is received from the server. That said, aside from > doing things which don't seem very "pythonic" (ie: type checking), there's > not a whole lot more we can do to catch bad data being sent by the server. > > In any event, I've added additional tests which should test any type > reasonable to see in a JSON blob. The version concatenation will still throw > an exception, but it's already being explicitly handled/expected and logged > and is doing so by design. Hello, I have tracked this bug in RHEL7.1-20141029.0, the value of "subscription management rules" is still "Unknown", but "subscription management server" field is ok now. Do you mean this bug can be verified totally when new SAM server build comes? Thank you. Qianqian Zhang Sorry for the delay in responding to this. This is an issue with the SAM server not sending version information for rules. Once the SAM server is updated to return version information for the rules, it will show up as expected in subscription manager. Chris has established this isn't really a problem with Subscription Manager, it's that SAM is intercepting the GET /status API call and returning it's own response. SAM would need to be updated to return the rules version from Candlepin to fix this. Given SAM is now in maintenance mode, re-aligning for fixing in Satellite 6. 02:19pm <thomasmckay> $ sudo subscription-manager version 02:19pm <thomasmckay> server type: Red Hat Subscription Management 02:19pm <thomasmckay> subscription management server: 2.1.0-Unknown 02:19pm <thomasmckay> subscription management rules: 5.11 02:19pm <thomasmckay> subscription-manager: 1.13.5-1.fc19 02:19pm <thomasmckay> python-rhsm: 1.12.5-1.fc19 This looks to already be fixed in Sat 6, but no fix will be forthcoming for SAM however. |