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

See Also:
Fixed In Version: virt-who-0.11-5.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 05:23:57 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-26 02:33:58 EST
Description of problem:
When virt-who run at vdsm mode, If there is a virtual machine under the host, virt-who won't send host/guest associate to SAM server as "TypeError: 'str' object is not callable"

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
vdsm-4.16.7.5-1.el7ev.x86_64

How reproducible:
Always

Preconditon: Make sure there is a guest in the host 
1. In the rhevh host, Set the virt-who parameters in file /etc/sysconfig/virt-who to make virt-who working in VDSM mode:
   VIRTWHO_DEBUG=1
   VIRTWHO_VDSM=1
   VIRTWHO_INTERVAL=5
2. Restart service virt-who
   # service virt-who restart
   Stopping virt-who:                                         [  OK  ]
   Starting virt-who:                                         [  OK  ]
3. Restart vdsmd service
   # service vdsmd restart
   Shutting down vdsm daemon: 
   vdsm watchdog stop                                         [  OK  ]
   vdsm stop                                                  [  OK  ]
   vdsm: libvirt already configured for vdsm                  [  OK  ]
   Starting iscsid: 
   Starting up vdsm daemon: 
   vdsm start                                                 [  OK  ]
4. check the log file:
   # tail -f /var/log/rhsm/rhsm.log

Actual results:
Virt-who failed to send host/guest associate to SAM server as it's failed to communiate with subscription-manager
2014-11-26 15:29:55,179 [INFO]  @virtwho.py:458 - Using commandline or sysconfig configuration ("vdsm" mode)
2014-11-26 15:29:55,179 [DEBUG]  @virtwho.py:170 - Starting infinite loop with 5 seconds interval
2014-11-26 15:29:55,398 [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 152, in _sendGuests
    manager.sendVirtGuests(virtualGuests)
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 104, in sendVirtGuests
    domains.sort(key=key)
TypeError: 'str' object is not callable

Expected results:
virt-who should send host/guest associate to SAM server successfully.

Additional info:
If there isn't vm in the host, it hasn't this problem
Comment 2 Radek Novacek 2014-11-26 03:07:53 EST
This issue has been addressed upstream:

https://git.fedorahosted.org/cgit/virt-who.git/commit/?id=a0e0ad4bdd02105c23dc8aa32629e55fed139bb4
Comment 3 Radek Novacek 2014-11-28 06:19:41 EST
Fixed in virt-who-0.11-5.el7.
Comment 5 Liushihui 2014-12-23 03:15:53 EST
Verify it on virt-who-0.11-5.el7.

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

1.Register system to sam server and configure virt-who run at vdsm mode.
# cat /etc/sysconfig/virt-who
   VIRTWHO_DEBUG=1
   VIRTWHO_VDSM=1
   VIRTWHO_INTERVAL=5
   VIRTWHO_VDSM=1
2. Restart service virt-who
   # service virt-who restart
   Stopping virt-who:                                         [  OK  ]
   Starting virt-who:                                         [  OK  ]
3. Start vm on rhevm web UI, make sure it run at this rhel system
4. Check the virt-who's log in the /var/log/rhsm/rhsm.log
2014-12-23 16:09:41,259 [INFO]  @virtwho.py:458 - Using commandline or sysconfig configuration ("vdsm" mode)
2014-12-23 16:09:41,260 [DEBUG]  @virtwho.py:170 - Starting infinite loop with 5 seconds interval
2014-12-23 16:10:39,183 [INFO]  @subscriptionmanager.py:112 - Sending list of uuids: []
2014-12-23 16:10:50,542 [INFO]  @subscriptionmanager.py:112 - Sending list of uuids: []
2014-12-23 16:11:01,906 [INFO]  @subscriptionmanager.py:112 - Sending list of uuids: []
2014-12-23 16:11:13,203 [INFO]  @subscriptionmanager.py:112 - Sending list of uuids: ['d32dea8e-1157-42fe-9bfa-618b8b6df3c9']
2014-12-23 16:11:24,583 [INFO]  @subscriptionmanager.py:112 - Sending list of uuids: ['d32dea8e-1157-42fe-9bfa-618b8b6df3c9']
2014-12-23 16:11:36,029 [INFO]  @subscriptionmanager.py:112 - Sending list of uuids: ['d32dea8e-1157-42fe-9bfa-618b8b6df3c9']

Result: virt-who can send the host/guest associate to SAM server correctly. Therefore, verify it
Comment 7 errata-xmlrpc 2015-03-05 05:23:57 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.