RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1124685 - Fail to get "rules-version" and "candlepin version" when unregister from SAM server
Summary: Fail to get "rules-version" and "candlepin version" when unregister from SAM ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-rhsm
Version: 6.6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel66
TreeView+ depends on / blocked
 
Reported: 2014-07-30 05:42 UTC by Liushihui
Modified: 2014-10-14 07:47 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
no documentation required
Clone Of:
Environment:
Last Closed: 2014-10-14 07:47:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1384 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2014-10-14 01:27:50 UTC

Description Liushihui 2014-07-30 05:42:59 UTC
Description of problem:
Unregistered system, it will appear error message "Error while checking server version: 'rulesVersion'" in the virt-who log.both "rules-version" and "candlepin version" are 'Unknown'

Version-Release number of selected component (if applicable):
subscription-manager-1.12.4-1.el6.x86_64
python-rhsm-1.12.4-1.el6.x86_64
virt-who-0.10-3.el6.noarch
katello-headpin-1.4.3.26-1.el6sam_splice.noarch
candlepin-0.9.6.4-1.el6sam.noarch

How reproducible:
Always

Steps to Reproduce:
1.Register system to SAM server
# subscription-manager register --username=admin --password=admin
2. Configure virt-who run at libvirtd mode
# vim /etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=5
3. Restart virt-who service, virt-who send host/guest associate to SAM server
# service virt-who restart
4. Unregister the system
#  subscription-manager unregister

Actual results:
System has been unregistered successfully, but it will generate error message "Error while checking server version: 'rulesVersion'" in the virt-who log, it failed to get value of "rules-version" and "candlepin version". both of them are "Unknown". please see detail as the following:

subscription-manager @plugins.py:569 - loaded plugin modules: []
2014-07-30 13:08:21,522 [DEBUG] subscription-manager @plugins.py:570 - loaded plugins: {}
2014-07-30 13:08:21,522 [DEBUG] subscription-manager @identity.py:131 - Loading consumer info from identity certificates.
2014-07-30 13:08:21,550 [DEBUG] subscription-manager @profile.py:97 - Loading current RPM profile.
2014-07-30 13:08:21,639 [INFO] subscription-manager @managercli.py:298 - Client Versions: {'python-rhsm': '1.12.4-1.el6', 'subscription-manager': '1.12.4-1.el6'}
2014-07-30 13:08:21,640 [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-07-30 13:08:21,640 [INFO] subscription-manager @connection.py:670 - Connection Built: host: samserv.redhat.com, port: 443, handler: /sam/api
2014-07-30 13:08:21,640 [INFO] subscription-manager @connection.py:666 - Using no auth
2014-07-30 13:08:21,640 [INFO] subscription-manager @connection.py:670 - Connection Built: host: samserv.redhat.com, port: 443, handler: /sam/api
2014-07-30 13:08:21,651 [DEBUG] subscription-manager @connection.py:414 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, candlepin-local.pem, candlepin-stage.pem
2014-07-30 13:08:21,651 [DEBUG] subscription-manager @connection.py:446 - Making request: GET /sam/api/
2014-07-30 13:08:21,700 [DEBUG] subscription-manager @connection.py:469 - Response: status=200
2014-07-30 13:08:21,702 [DEBUG] subscription-manager @connection.py:686 - Server supports the following resources:
2014-07-30 13:08:21,703 [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-07-30 13:08:21,704 [DEBUG] subscription-manager @connection.py:414 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, candlepin-local.pem, candlepin-stage.pem
===================================================
2014-07-30 13:08:21,704 [DEBUG] subscription-manager @connection.py:446 - Making request: GET /sam/api/status
2014-07-30 13:08:21,732 [DEBUG] subscription-manager @connection.py:469 - Response: status=200
2014-07-30 13:08:21,733 [ERROR] subscription-manager @utils.py:240 - Error while checking server version: 'rulesVersion'
2014-07-30 13:08:21,733 [ERROR] subscription-manager @utils.py:242 - 'rulesVersion'
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/utils.py", line 224, in get_server_versions
    rules_version = status['rulesVersion']
KeyError: 'rulesVersion'
2014-07-30 13:08:21,734 [INFO] subscription-manager @managercli.py:309 - Server Versions: {'rules-version': 'Unknown', 'candlepin': 'Unknown', 'server-type': 'Red Hat Subscription Management'}
===================================================
2014-07-30 13:08:21,734 [INFO] subscription-manager @managercli.py:274 - self.identity: <Identity, name=hp-z220-05.qe.lab.eng.nay.redhat.com, uuid=51d50263-816c-4caa-9511-5bb56d6c8f1a, consumer=consumer: name="hp-z220-05.qe.lab.eng.nay.redhat.com", uuid=51d50263-816c-4caa-9511-5bb56d6c8f1a>
2014-07-30 13:08:21,736 [DEBUG] subscription-manager @connection.py:414 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, candlepin-local.pem, candlepin-stage.pem
2014-07-30 13:08:21,737 [DEBUG] subscription-manager @connection.py:446 - Making request: DELETE /sam/api/consumers/51d50263-816c-4caa-9511-5bb56d6c8f1a
2014-07-30 13:08:22,255 [DEBUG] subscription-manager @connection.py:469 - Response: status=204
2014-07-30 13:08:22,256 [INFO] subscription-manager @managerlib.py:802 - Successfully un-registered.
2014-07-30 13:08:22,263 [DEBUG] subscription-manager @managerlib.py:848 - Removing identity cert: /etc/pki/consumer/key.pem
2014-07-30 13:08:22,263 [DEBUG] subscription-manager @managerlib.py:848 - Removing identity cert: /etc/pki/consumer/cert.pem
2014-07-30 13:08:22,263 [DEBUG] subscription-manager @identity.py:131 - Loading consumer info from identity certificates.


Expected results:
system unregistered successfully, and it won't generate any error message when check "rules-version" and "candlepin", it should display the correct value of "rules-version" and "candlepin version",just the same as RHEL5.11. Please see the correct virt-who log on RHEL5.11

2014-07-30 01:09:58,294 [DEBUG] subscription-manager @plugins.py:533 - loaded plugin modules: []
2014-07-30 01:09:58,294 [DEBUG] subscription-manager @plugins.py:534 - loaded plugins: {}
2014-07-30 01:09:58,320 [DEBUG] subscription-manager @identity.py:131 - Loading consumer info from identity certificates.
2014-07-30 01:09:58,327 [DEBUG] subscription-manager @profile.py:97 - Loading current RPM profile.
2014-07-30 01:09:58,414 [INFO] subscription-manager @managercli.py:293 - Client Versions: {'python-rhsm': '1.11.3-5.el5', 'subscription-manager': '1.11.3-10.el5'}
2014-07-30 01:09:58,415 [INFO] subscription-manager @connection.py:661 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2014-07-30 01:09:58,415 [INFO] subscription-manager @connection.py:674 - Connection Built: host: samserv.redhat.com, port: 443, handler: /sam/api
2014-07-30 01:09:58,415 [INFO] subscription-manager @connection.py:671 - Using no auth
2014-07-30 01:09:58,415 [INFO] subscription-manager @connection.py:674 - Connection Built: host: samserv.redhat.com, port: 443, handler: /sam/api
2014-07-30 01:09:58,429 [DEBUG] subscription-manager @connection.py:419 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, candlepin-stage.pem, candlepin-local.pem
2014-07-30 01:09:58,429 [DEBUG] subscription-manager @connection.py:451 - Making request: GET /sam/api/
2014-07-30 01:09:58,477 [DEBUG] subscription-manager @connection.py:474 - Response: status=200
2014-07-30 01:09:58,478 [DEBUG] subscription-manager @connection.py:691 - Server supports the following resources:
2014-07-30 01:09:58,479 [DEBUG] subscription-manager @connection.py:692 - {'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-07-30 01:09:58,480 [DEBUG] subscription-manager @connection.py:419 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, candlepin-stage.pem, candlepin-local.pem
===================================================
2014-07-30 01:09:58,480 [DEBUG] subscription-manager @connection.py:451 - Making request: GET /sam/api/status
2014-07-30 01:09:58,510 [DEBUG] subscription-manager @connection.py:474 - Response: status=200
2014-07-30 01:09:58,510 [INFO] subscription-manager @managercli.py:304 - Server Versions: {'candlepin': '1.4.3.26-1.el6sam_splice-Headpin', 'server-type': 'Red Hat Subscription Management'}
===================================================
2014-07-30 01:09:58,514 [DEBUG] subscription-manager @connection.py:419 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, candlepin-stage.pem, candlepin-local.pem
2014-07-30 01:09:58,514 [DEBUG] subscription-manager @connection.py:451 - Making request: DELETE /sam/api/consumers/50ea400d-0cbd-4669-b80e-d0ac9588b6a6
2014-07-30 01:09:58,825 [DEBUG] subscription-manager @connection.py:474 - Response: status=204
2014-07-30 01:09:58,826 [INFO] subscription-manager @managerlib.py:800 - Successfully un-registered.


Additional info:

Comment 2 Radek Novacek 2014-07-30 06:48:23 UTC
This seems to be bug in python-rhsm, virt-who doesn't do anything with rules-version or candlepin version.

Comment 3 Adrian Likins 2014-08-14 16:38:54 UTC
pr at https://github.com/candlepin/subscription-manager/pull/1004

Comment 5 Liushihui 2014-08-28 08:30:45 UTC
Verified on RHEL6.6-Server-x64-20140826.0

Version:
virt-who-0.10-6.el6.noarch
subscription-manager-1.12.13-1.el6.x86_64
python-rhsm-1.12.5-1.el6.x86_64

Comment 6 errata-xmlrpc 2014-10-14 07:47:54 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-2014-1384.html


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