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 1163021 - Failed to send host/guest associate to SAM when virt-who run at esx mode
Summary: Failed to send host/guest associate to SAM when virt-who run at esx mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.1
Hardware: x86_64
OS: All
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-12 09:02 UTC by Liushihui
Modified: 2016-12-01 00:33 UTC (History)
3 users (show)

Fixed In Version: virt-who-0.11-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:23:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0430 0 normal SHIPPED_LIVE Moderate: virt-who security, bug fix, and enhancement update 2015-03-05 14:52:46 UTC

Description Liushihui 2014-11-12 09:02:55 UTC
Description of problem:
Configured virt-who run at esx mode, then restart virt-who service, it will pop up error log "AttributeError: 'Esx' object has no attribute 'config'". it's failed to send host/guest associate to SAM server

Version-Release number of selected component (if applicable):
subscription-manager-1.13.8-1.el7.x86_64
python-rhsm-1.13.7-1.el7.x86_64
virt-who-0.11-3.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1.Register system to SAM server 
[root@hp-z220-05 default]# subscription-manager register --username=admin --password=admin
The system has been registered with ID: f8957bf3-5939-4b1f-83df-57e1b2096bc4 
2.Configure virt-who run at esx mode
# vim /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.79.89
VIRTWHO_ESX_USERNAME=Administrator
VIRTWHO_ESX_PASSWORD=qwer1234P!
# systemctl restart virt-who
3.Check the virt-who log
# tail -f /var/log/rhsm/rhsm.log

Actual results:
It will show error log as the following, failed to send host/guest associate to SAM server
2014-11-12 16:46:54,386 [INFO]  @virtwho.py:458 - Using commandline or sysconfig configuration ("esx" mode)
2014-11-12 16:46:54,387 [DEBUG]  @virtwho.py:170 - Starting infinite loop with 5 seconds interval
2014-11-12 16:47:01,504 [ERROR]  @virtwho.py:134 - Error in communication with subscription manager, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virtwho.py", line 126, in _send
    self._sendGuests(virt, virtualGuests)
  File "/usr/share/virt-who/virtwho.py", line 154, in _sendGuests
    result = manager.hypervisorCheckIn(virt.config, virtualGuests)
AttributeError: 'Esx' object has no attribute 'config'

Expected results:
It should send host/guest associate to SAM server 

Additional info:

Comment 3 Radek Novacek 2014-11-13 11:27:24 UTC
Fixed in virt-who-0.11-4.el7.

Comment 5 Liushihui 2014-11-24 07:11:00 UTC
As the latest RHEL7.1 build with virt-who-0.11-3.el7.noarch, so I need to wait for a new rhel7.1 build with virt-who-0.11-4.el7 to verify this bug.

Comment 6 Liushihui 2014-11-28 07:35:40 UTC
Verified it on virt-who-0.11-4.el7.noarch.

Version-Release number of selected component (if applicable):
subscription-manager-1.13.9-1.el7.x86_64
python-rhsm-1.13.8-1.el7.x86_64
virt-who-0.11-4.el7.noarch
katello-headpin-1.4.3.28-1.el6sam_splice.noarch
candlepin-0.9.6.5-1.el6sam.noarch

Verified process:
1.Register system to SAM server 
[root@hp-z220-05 libvirt-test-API]# subscription-manager register --username=admin --password=admin
The system has been registered with ID: e3abf301-1772-4e9c-b4f2-b24a7acef326 
2.Configure virt-who run at esx mode
# vim /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.79.89
VIRTWHO_ESX_USERNAME=Administrator
VIRTWHO_ESX_PASSWORD=qwer1234P!
# systemctl restart virt-who
3.Check the virt-who log, virt-who send correct host/guest associate to SAM server.
# tail -f /var/log/rhsm/rhsm.log
2014-11-28 15:30:56,781 [INFO]  @virtwho.py:458 - Using commandline or sysconfig configuration ("esx" mode)
2014-11-28 15:30:56,781 [DEBUG]  @virtwho.py:170 - Starting infinite loop with 5 seconds interval
2014-11-28 15:31:02,244 [INFO]  @subscriptionmanager.py:116 - Sending update in hosts-to-guests mapping: {aee4ff00-8c33-11e2-994a-6c3be51d959a: [4229e196-30de-9b6b-d31b-f22b22166548, 564d30c2-464f-81ad-1db6-6ec620dd7465], 44454c4c-4200-1034-8039-b8c04f503258: [422929f3-8ade-7dcc-6119-4904c7e1b8eb]}

Comment 8 errata-xmlrpc 2015-03-05 10:23:55 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/RHSA-2015-0430.html


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