Bug 848781 - [RFE]virt-who CLI should provide "man" configure file to users.
Summary: [RFE]virt-who CLI should provide "man" configure file to users.
Keywords:
Status: CLOSED ERRATA
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:59 UTC by Hui Wang
Modified: 2016-12-01 00:30 UTC (History)
3 users (show)

Fixed In Version: virt-who-0.7-6.el5
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 07:35:51 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0072 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2013-01-07 15:27:17 UTC

Description Hui Wang 2012-08-16 11:59:33 UTC
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 Program Management 2012-08-16 12:17:40 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:51:20 UTC
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 09:52:05 UTC
(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 09:36:36 UTC
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 09:06:04 UTC
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 09:06:53 UTC
Created attachment 609912 [details]
attachment1 [details]

Comment 7 Hui Wang 2012-09-05 09:07:27 UTC
Created attachment 609913 [details]
attachment2 [details]

Comment 8 Hui Wang 2012-09-17 07:05:48 UTC
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 12:47:20 UTC
The man page has been added in virt-who-0.7-6.el5.

Comment 11 ndong 2012-09-20 03:25:55 UTC
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 06:08:13 UTC
Na, why did you set needinfo on me? Is there any unresolved question?

Comment 14 errata-xmlrpc 2013-01-08 07:35:51 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.

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.