Bug 848763 - "virt-who -b" can't monitor the virtual machine changes
Summary: "virt-who -b" can't monitor the virtual machine changes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-who
Version: 5.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: beta
: ---
Assignee: Radek Novacek
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 808061
TreeView+ depends on / blocked
 
Reported: 2012-08-16 11:22 UTC by Hui Wang
Modified: 2016-12-01 00:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-17 07:36:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Hui Wang 2012-08-16 11:22:32 UTC
Description of problem:
If delete/add/migration one virtual machine to the Host, virt-who can't send the update to Sam server in virt-who -b mode.

Version-Release number of selected component (if applicable):
virt-who-0.7-2.el5
subscription-manager-firstboot-1.0.13-1.el5
subscription-manager-1.0.13-1.el5
subscription-manager-gui-1.0.13-1.el5
python-rhsm-1.0.5-1.el5
katello-headpin-all-0.2.13-1.el6_2.noarch
candlepin-0.6.5-1.el6_2.noarch

How reproducible:
100%

Steps to Reproduce:
1. Register Host and some Guests that on the host to SAM
2. Edit virt-who config file on Host: 
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
3. start virt-service in background on Host
#virt-who -b
4. Check the /var/log/rhsm/rhsm.log on Host
5. Delete/add/migration Guests 
6. Check the service virt-who status on Host
7. Check the /var/log/rhsm/rhsm.log on Host, the log has no update.
8. Check the host/guest association on SAM server, there is no update.
  
Actual results:
/var/log/rhsm/rhsm.log and host/guest association on SAM server are not updated

Expected results:
The /var/log/rhsm/rhsm.log should be updated and the host/guest association should be updated

Additional info:

Comment 1 RHEL Program Management 2012-08-16 11:37:05 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Radek Novacek 2012-08-24 07:07:34 UTC
Thanks for the bug report. Can you rerun virt-who with "-d" argument and post rhsm.log here? Note that /etc/sysconfig/virt-who is used only for starting virt-who as a service and not from command line.

Comment 3 Hui Wang 2012-08-31 09:47:37 UTC
(In reply to comment #2)
> Thanks for the bug report. Can you rerun virt-who with "-d" argument and
> post rhsm.log here? Note that /etc/sysconfig/virt-who is used only for
> starting virt-who as a service and not from command line.

Run virt-who -b, there will nothing added and if add/delete guests, it still can't update. And check the host/guest association on SAM server, there is no update. So it is sure that virt-who -b has not sent the current guest uuids to SAM.

#virt-who -b
# tail -f /var/log/rhsm/rhsm.log
2012-08-31 05:35:44,637 [DEBUG]  @virt.py:62 - Virtual machine found: test: b83cf771-fc48-db4b-e66c-586ab00aa9d7
2012-08-31 05:35:44,641 [DEBUG]  @virt.py:62 - Virtual machine found: 6.3_Server_x86_64_FV: aaa3df8b-934a-25c5-576c-137ed0e0bfa4
2012-08-31 05:35:44,645 [DEBUG]  @virt.py:62 - Virtual machine found: 6.2_Server_x86_64_PV: d75178e2-bf31-0559-15a4-b39a3251af43
2012-08-31 05:35:44,649 [DEBUG]  @virt.py:62 - Virtual machine found: 5.8_Server_x86_64_FV: 00d608f7-27b6-b06e-3cde-99df12b030a2
2012-08-31 05:35:44,658 [DEBUG]  @virt.py:62 - Virtual machine found: 6.2_Client_i386_FV: 26dc37dc-a7eb-ef91-435f-43e106df7526
2012-08-31 05:35:44,665 [DEBUG]  @virt.py:62 - Virtual machine found: 6.3_Client_i386_FV: 916f7602-93c6-30ab-6d10-6fbb74ac1466
2012-08-31 05:35:44,673 [DEBUG]  @virt.py:62 - Virtual machine found: 5.8_Client_i386_PV: c80de70a-4d27-67b3-d706-c98047585b91
2012-08-31 05:35:44,681 [DEBUG]  @virt.py:62 - Virtual machine found: 5.8_Server_x86_64_PV: 7cc6a77c-5b9e-bf11-ccd9-6b857ffce55c
2012-08-31 05:35:44,689 [DEBUG]  @virt.py:62 - Virtual machine found: 6.2_Server_x86_64_FV: d1c45dcf-b209-1879-29b6-e46ab7a821aa
2012-08-31 05:35:44,690 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['00d608f7-27b6-b06e-3cde-99df12b030a2', '26dc37dc-a7eb-ef91-435f-43e106df7526', '4c67eea4-a82b-4e69-1c08-ce37f67837f4', '581cee95-9f8d-5626-bf45-eaebdec0d408', '7bbf24d8-03f2-e493-5aa9-0aaa8042c8fd', '7cc6a77c-5b9e-bf11-ccd9-6b857ffce55c', '916f7602-93c6-30ab-6d10-6fbb74ac1466', 'aaa3df8b-934a-25c5-576c-137ed0e0bfa4', 'b83cf771-fc48-db4b-e66c-586ab00aa9d7', 'c80de70a-4d27-67b3-d706-c98047585b91', 'd1c45dcf-b209-1879-29b6-e46ab7a821aa', 'd75178e2-bf31-0559-15a4-b39a3251af43', 'eb5b2200-cf4c-ac3d-0ac3-184353fa328c']

Comment 4 Radek Novacek 2012-09-03 09:48:24 UTC
The log looks correctly. Does the other virt-who modes work? Like -o or without argument?

Can you rerun it as "virt-who -b -d" and paste /var/log/rhsm/rhsm.log here?

Comment 5 Hui Wang 2012-09-05 09:34:32 UTC
Now actually the CLI "virt-who -d", "virt-who -b", "virt-who -o" can send the current guest uuids to the SAM server (how to verify--e.g: https://bugzilla.redhat.com/show_bug.cgi?id=848781#comment5).
But these CLI mode still can't update log in /var/log/rhsm/rhsm.log except using "virt-who -b -d"
virt-who -d and virt-who -b are both running in background mode. What is the difference between them? only the standard output?

Version: 
	virt-who-0.7-5.el5
	libvirt-0.8.2-29.el5
	python-rhsm-1.0.6-1.el5
	subscription-manager-1.0.14-1.el5
	katello-headpin-all-0.2.13-1.el6_2.noarch
	candlepin-0.6.5-1.el6_2.noarch


===============================================
# virt-who -b -d
# tail -f /var/log/rhsm/rhsm.log 
2012-09-05 03:16:56,538 [DEBUG]  @virt-who.py:428 - Virt-who is running in libvirt mode
2012-09-05 03:16:56,540 [DEBUG]  @virt-who.py:437 - Starting infinite loop with 3600 seconds interval
2012-09-05 03:16:56,542 [DEBUG]  @virt.py:56 - Virtual machine found: add: 9669159d-ca1d-a5f9-0c21-63e24bcb9c2e
2012-09-05 03:16:56,545 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 03:16:56,547 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77', '9669159d-ca1d-a5f9-0c21-63e24bcb9c2e']
2012-09-05 04:09:09,828 [DEBUG]  @virt-who.py:410 - Starting event loop
2012-09-05 04:09:09,973 [DEBUG]  @virt-who.py:428 - Virt-who is running in libvirt mode
2012-09-05 04:09:09,973 [DEBUG]  @virt-who.py:435 - Starting infinite loop with 3600 seconds interval and event handling
2012-09-05 04:09:09,976 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 04:09:09,978 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77']
2012-09-05 04:10:29,627 [DEBUG]  @virt.py:72 - EVENT: Domain add(11) Started Booted^^^^^^^^^^^^^^^^^^^^^^^^add one guest

2012-09-05 04:10:29,635 [DEBUG]  @virt.py:56 - Virtual machine found: add: 6f78ffe3-a93b-32b5-1bc1-31b8bfcd72cc
2012-09-05 04:10:29,658 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 04:10:29,662 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77', '6f78ffe3-a93b-32b5-1bc1-31b8bfcd72cc']

2012-09-05 04:13:20,183 [DEBUG]  @virt.py:72 - EVENT: Domain add(-1) Undefined Removed^^^^^^^^^^^^^^^^^^^delete one guest
2012-09-05 04:13:20,187 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 04:13:20,190 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77']

2012-09-05 04:17:38,511 [DEBUG]  @virt.py:72 - EVENT: Domain 6.3_Server_x86_64(14) Started Migrated^^^^^^^^^^migrated one guest to the host
2012-09-05 04:17:38,514 [DEBUG]  @virt.py:56 - Virtual machine found: 6.3_Server_x86_64: 3fdbcaf5-fb07-2e1f-f6cd-90ef0dc92e40
2012-09-05 04:17:38,515 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 04:17:38,517 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77', '3fdbcaf5-fb07-2e1f-f6cd-90ef0dc92e40']

==========================================
# virt-who -d
WARNING: Listening for events is not available in VDSM or ESX mode
DEBUG: Virt-who is running in libvirt mode
DEBUG: Starting infinite loop with 3600 seconds interval
DEBUG: Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
DEBUG: Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77']

^^^^^^^^^^^^^^^^^^^^^^^Add/delete/migrate guests, the /var/log/rhsm/rhsm.log no updates

===========================================
# virt-who -b 
# tail -f /var/log/rhsm/rhsm.log 
2012-09-05 04:13:15,916 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 04:13:15,919 [DEBUG]  @virt.py:62 - Virtual machine found: add: 6f78ffe3-a93b-32b5-1bc1-31b8bfcd72cc
2012-09-05 04:13:15,920 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77', '6f78ffe3-a93b-32b5-1bc1-31b8bfcd72cc']

^^^^^^^^^^^^^^^^^^^^^Add/delete/migrate guests, the /var/log/rhsm/rhsm.log no updates.



============================================
# virt-who -o
# tail -f /var/log/rhsm/rhsm.log 
...............
2012-09-05 04:18:10,908 [DEBUG]  @virt.py:56 - Virtual machine found: 6.3_Server_x86_64: 3fdbcaf5-fb07-2e1f-f6cd-90ef0dc92e40
2012-09-05 04:18:10,910 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 04:18:10,911 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77', '3fdbcaf5-fb07-2e1f-f6cd-90ef0dc92e40']
^^^^^^^^^^^^^^^^^^^^^Add/delete/migrate guests, the /var/log/rhsm/rhsm.log no updates.

Comment 6 Hui Wang 2012-09-17 07:36:01 UTC
Only virt-who -d can provide the log in /var/log/rhsm/rhsm.log even if virt-who -b can monitor the events. It will provide the "man" configure file to make CLI clarely. This will be traced by https://bugzilla.redhat.com/show_bug.cgi?id=848781. So move the bug to CLOSED.


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