Bug 848781 - [RFE]virt-who CLI should provide "man" configure file to users.
[RFE]virt-who CLI should provide "man" configure file to users.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-who (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity medium
: beta
: ---
Assigned To: Radek Novacek
Entitlement Bugs
: FutureFeature
Depends On:
Blocks: 808061
  Show dependency treegraph
 
Reported: 2012-08-16 07:59 EDT by Hui Wang
Modified: 2013-01-08 02:35 EST (History)
2 users (show)

See Also:
Fixed In Version: virt-who-0.7-6.el5
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-08 02:35:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
attachment1 (203.14 KB, image/png)
2012-09-05 05:06 EDT, Hui Wang
no flags Details
attachment2 (200.13 KB, image/png)
2012-09-05 05:07 EDT, Hui Wang
no flags Details

  None (edit)
Description Hui Wang 2012-08-16 07:59:33 EDT
Description of problem:
After add/delete virtual machine, start virt-who use virt-who -o, the virt-who can't report the current virt.uuids.

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 to SAM server
2. Edit virt-who config file on Host: 
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
3. Check the /var/log/rhsm/rhsm.log
4. Add one virtual machine
5. Start virt-who 
#virt-who -o
6. Check the /var/log/rhsm/rhsm.log
  
Actual results:
After add/delete virtual machine, start virt-who use virt-who -o, the /var/log/rhsm/rhsm.log can't update

Expected results:
After add/delete virtual machine, start virt-who use virt-who -o, virt-who can report the current virt.uuids, and then stop virt-who.

Additional info:
Comment 1 RHEL Product and Program Management 2012-08-16 08:17:40 EDT
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 03:51:20 EDT
You have to specify "-d" command line option if you want to have debugging output in the log file. /etc/sysconfig/virt-who is read only when starting virt-who as a service.

Can you please retry this with "-d" option and check if the list of uuid updates on server? Thank you.
Comment 3 Hui Wang 2012-08-31 05:52:05 EDT
(In reply to comment #2)
> You have to specify "-d" command line option if you want to have debugging
> output in the log file. /etc/sysconfig/virt-who is read only when starting
> virt-who as a service.
> 
> Can you please retry this with "-d" option and check if the list of uuid
> updates on server? Thank you.

Hi Radek, 

virt-who -d will send the debug info to /var/log/rhsm/rhsm.log.
virt-who -o has no the function. But virt-who -o should send the updates to SAM server, right? I will check the result asap next week. :)

Regards,
Hui Wang
Comment 4 Radek Novacek 2012-09-03 05:36:36 EDT
Hi Hui,

virt-who -d -o should print list of guests to standard error output and append it to /var/log/rhsm/rhsm.log, send it to the SAM server and exit. It works for me, with output like this:

[root@dell-pe1950-02 ~]# virt-who -d -o 
DEBUG: Virt-who is running in libvirt mode
DEBUG: Virtual machine found: test2: 86fbf400-b4ec-3066-442c-be1c91520eaf
DEBUG: Virtual machine found: test: b79b85b7-004f-571c-1189-e8901a27e604
DEBUG: Sending list of uuids: ['86fbf400-b4ec-3066-442c-be1c91520eaf', 'b79b85b7-004f-571c-1189-e8901a27e604']
[root@dell-pe1950-02 ~]# 

If it behaves differently for you, please paste the output here.
Comment 5 Hui Wang 2012-09-05 05:06:04 EDT
virt-who -o can send the current guest uuids to the SAM server. But only run CLI virt-who -o the log can't update. Should the log will be updated in this CLI mode? or must be use virt-who -o -d can update the log?

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

Step:
1. Register Host to SAM server
2. Check the Host/guest association on SAM server, see attachment1 [details] and log

[root@amd-5400b-4-4 home]# tail -f /var/log/rhsm/rhsm.log 
.............
2012-09-05 04:17:13,965 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 04:17:13,966 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77']

3. Add one guest on the Host, and check the hostname
[root@virtlab-66-84-215 ~]# hostname
virtlab-66-84-215.englab.nay.redhat.com

4. Register the guest to SAM
5. Run CLI virt-who -o
#virt-who -o

6. Check the current log
[root@amd-5400b-4-4 home]# tail -f /var/log/rhsm/rhsm.log 
.............
2012-09-05 04:17:13,965 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 04:17:13,966 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77']

7. Run CLI virt-who -d -o 
# virt-who -d -o 
DEBUG: Virt-who is running in libvirt mode
DEBUG: Virtual machine found: 6.3_Server_x86_64: 3fdbcaf5-fb07-2e1f-f6cd-90ef0dc92e40
DEBUG: Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
DEBUG: Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77', '3fdbcaf5-fb07-2e1f-f6cd-90ef0dc92e40']
#
# tail -f /var/log/rhsm/rhsm.log 
2012-09-05 05:00:17,396 [DEBUG]  @virt-who.py:428 - Virt-who is running in libvirt mode
2012-09-05 05:00:17,399 [DEBUG]  @virt.py:56 - Virtual machine found: 6.3_Server_x86_64: 3fdbcaf5-fb07-2e1f-f6cd-90ef0dc92e40
2012-09-05 05:00:17,401 [DEBUG]  @virt.py:56 - Virtual machine found: 5.8_Server_x86_64: 26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77
2012-09-05 05:00:17,403 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['26bf6b1d-e6fc-29ed-3d8c-bb89f15f3e77', '3fdbcaf5-fb07-2e1f-f6cd-90ef0dc92e40']

8. Check the host/guest association on SAM server, see attachment2 [details]
Comment 6 Hui Wang 2012-09-05 05:06:53 EDT
Created attachment 609912 [details]
attachment1 [details]
Comment 7 Hui Wang 2012-09-05 05:07:27 EDT
Created attachment 609913 [details]
attachment2 [details]
Comment 8 Hui Wang 2012-09-17 03:05:48 EDT
virt-who -o should be via virt-who -o -d can give the log in /var/log/rhsm/rhsm.log. This is not clearly to terminal users. It is necessary to provide "man" configure file to guide users.
Comment 9 Radek Novacek 2012-09-17 08:47:20 EDT
The man page has been added in virt-who-0.7-6.el5.
Comment 11 ndong 2012-09-19 23:25:55 EDT
Since man page has been add in virt-who-0.7-6.el5, changed status from ON_QA to
VERIFIED.
Comment 12 Radek Novacek 2012-09-20 02:08:13 EDT
Na, why did you set needinfo on me? Is there any unresolved question?
Comment 14 errata-xmlrpc 2013-01-08 02:35:51 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.

http://rhn.redhat.com/errata/RHBA-2013-0072.html

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