Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1163021 - Failed to send host/guest associate to SAM when virt-who run at esx mode
Failed to send host/guest associate to SAM when virt-who run at esx mode
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who (Show other bugs)
7.1
x86_64 All
unspecified Severity urgent
: rc
: ---
Assigned To: Radek Novacek
John Sefler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-12 04:02 EST by Liushihui
Modified: 2016-11-30 19:33 EST (History)
3 users (show)

See Also:
Fixed In Version: virt-who-0.11-4.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 05:23:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0430 normal SHIPPED_LIVE Moderate: virt-who security, bug fix, and enhancement update 2015-03-05 09:52:46 EST

  None (edit)
Description Liushihui 2014-11-12 04:02:55 EST
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@vsphere.local
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 06:27:24 EST
Fixed in virt-who-0.11-4.el7.
Comment 5 Liushihui 2014-11-24 02:11:00 EST
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 02:35:40 EST
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@vsphere.local
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 05:23:55 EST
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.