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 1247890 - virt-who shows communication error with subscription manager for ESX against SAM
Summary: virt-who shows communication error with subscription manager for ESX against SAM
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rhsm
Version: 7.2
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Chris Snyder
QA Contact: xingge
Lenka Špačková
URL:
Whiteboard:
Depends On:
Blocks: 1246125
TreeView+ depends on / blocked
 
Reported: 2015-07-29 07:45 UTC by Eko
Modified: 2016-09-20 02:28 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
virt-who unable to log information when connected to SAM On systems registered to the Subscription Asset Manager (SAM) server, the virt-who service logs an "Error in communication with subscription manager" instead of the expected output. This is due to the python-rhsm library being unable to retrieve the capabilities of the Candlepin manager from the SAM server.
Clone Of:
Environment:
Last Closed: 2015-11-19 11:49:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2122 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2015-11-19 10:31:14 UTC

Description Eko 2015-07-29 07:45:17 UTC
Description of problem:
When system is registered to sam server, virt-who will show many error message when communicate with subscription-manager

Version-Release number of selected component (if applicable):
- RHEL7.2-20150720.0-Server-x86_64 + ESX6.0 against sam
- virt-who-0.14-2.el7.noarch
- subscription-manager-1.15.6-1.el7.x86_64
- python-rhsm-1.15.3-1.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1. config /etc/rhsm/rhsm.conf for sam server
rpm -ihv http://10.66.144.177/pub/candlepin-cert-consumer-samserv.redhat.com-1.0-1.noarch.rpm

2. config /etc/sysconfig/virt-who for esx mode
# grep -v  "^#" /etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=5
VIRTWHO_ESX=1
VIRTWHO_ESX_OWNER=ACME_Corporation
VIRTWHO_ESX_ENV=Library
VIRTWHO_ESX_SERVER=10.66.78.89
VIRTWHO_ESX_USERNAME=administrator
VIRTWHO_ESX_PASSWORD=qwer1234P!


3. register host to sam server
# subscription-manager register --username=admin --password=admin
The system has been registered with ID: 345908e6-d255-44bf-bedf-2317de27217f

# subscription-manager identity 
system identity: 345908e6-d255-44bf-bedf-2317de27217f
name: dhcp-128-13.nay.redhat.com
org name: ACME_Corporation
org ID: ACME_Corporation

4. restart virt-who and check status
# systemctl restart virt-who.service

# systemctl status virt-who.service 
● virt-who.service - Daemon for reporting virtual guest IDs to subscription-manager
   Loaded: loaded (/usr/lib/systemd/system/virt-who.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2015-07-29 15:42:29 CST; 26s ago
 Main PID: 8572 (python)
   CGroup: /system.slice/virt-who.service
           ├─8572 /usr/bin/python /usr/share/virt-who/virtwho.py
           └─8577 /usr/bin/python /usr/share/virt-who/virtwho.py

Jul 29 15:42:29 dhcp-128-13.nay.redhat.com systemd[1]: Started Daemon for reporting virtual guest IDs to subscription-manager.
Jul 29 15:42:29 dhcp-128-13.nay.redhat.com systemd[1]: Starting Daemon for reporting virtual guest IDs to subscription-manager...
Jul 29 15:42:29 dhcp-128-13.nay.redhat.com python[8572]: Using configuration "env/cmdline" ("esx" mode)

5. check rhsm.log
2015-07-29 15:43:25,168 [DEBUG]  @subscriptionmanager.py:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2015-07-29 15:43:25,199 [DEBUG]  @subscriptionmanager.py:146 - Checking if server has capability 'hypervisor_async'
2015-07-29 15:43:25,230 [ERROR]  @virtwho.py:177 - Error in communication with subscription manager:
Traceback (most recent call last):
  File "/usr/share/virt-who/virtwho.py", line 160, in send
    self._sendGuestAssociation(report)
  File "/usr/share/virt-who/virtwho.py", line 191, in _sendGuestAssociation
    report.config.type)
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 147, in hypervisorCheckIn
    is_async = hasattr(self.connection, 'has_capability') and self.connection.has_capability('hypervisors_async')
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 787, in has_capability
    self._load_manager_capabilities()
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 778, in _load_manager_capabilities
    self.capabilities = self.capabilities['managerCapabilities']
KeyError: 'managerCapabilities'


Actual results:
Error in communication with subscription manager

Expected results:
It should show the right host/guest mapping info in rhsm.og, no any error exception

Additional info:

Comment 2 Liushihui 2015-07-30 08:16:26 UTC
It happened when start virt-who service, it also has the same problem when virt-who run at remote libvirt mode/rhevm mode/hyperv mode.

Comment 3 Radek Novacek 2015-07-30 11:55:11 UTC
It looks like python-rhsm is missing some checks. Reassigning.

Please check if this is a bug in python-rhsm or it's fault of virt-who. Thanks.

Comment 4 Chris Snyder 2015-08-10 14:58:27 UTC
This was an issue with python-rhsm. A fix for this should be in as of commit: aba66ef25ebdcece72e9aaac7abf78d21b1cb9ff

Comment 5 Chris "Ceiu" Rog 2015-08-12 17:11:06 UTC
commit c63f2dd51ea4b05f0c013e084dbe871bf3af5c4c
Author: Christopher Snyder <csnyder>
Date:   Mon Aug 3 12:04:32 2015 -0400

    1247890: KeyErrors are now caught when checking manager capabilities

Comment 6 Chris "Ceiu" Rog 2015-08-12 17:12:38 UTC
Also includes:
89f63a06ffc2a523189b97de63bd5451ba67ea15
57e00f00f48ef18f8578975f88ac9d6491543702
aec81c065c282f55e99c8d232f8e9d543f177cf0
725ad4c95d78e7c13eb0a1141b59ad56404dae22
063791579ec3a08f87c7ba5e2ef4841465108da5

Comment 9 Eko 2015-08-18 10:38:45 UTC
update python-rhsm to 1.15.4-3, this issue can be fixed, host/guests mapping info can be found normally.

Comment 10 errata-xmlrpc 2015-11-19 11:49:44 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.

https://rhn.redhat.com/errata/RHBA-2015-2122.html


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