Bug 1253533 - virt-who still can be executed at background with -b option, but no -b or VIRTWHO_BACKGROUND any more
virt-who still can be executed at background with -b option, but no -b or VIR...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who (Show other bugs)
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Radek Novacek
Depends On:
  Show dependency treegraph
Reported: 2015-08-13 23:03 EDT by Eko
Modified: 2016-11-30 19:35 EST (History)
6 users (show)

See Also:
Fixed In Version: virt-who-0.14-4.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-19 06:57:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eko 2015-08-13 23:03:56 EDT
Description of problem:
virt-who-0.14-3.el7.noarch removed the -b and VIRTWHO_BACKGROUND already, but if I run "virt-who -b", still can make virt-who running in background. 

Version-Release number of selected component (if applicable):
 - RHEL7.2-20150806.1-Server-x86_64(KVM) against stage candlepin
 - virt-who-0.14-3.el7.noarch
 - subscription-manager-1.15.9-2.el7.x86_64
 - python-rhsm-1.15.4-2.el7.x86_64

How reproducible:

Steps to Reproduce:
1. stop virt-who service

2. check virt-who option, no -b option found
# virt-who --help
Usage: virt-who [-d] [-i INTERVAL] [-o] [--sam|--satellite5|--satellite6] [--libvirt|--vdsm|--esx|--rhevm|--hyperv]

Agent for reporting virtual guest IDs to subscription manager

  -h, --help            show this help message and exit
  -d, --debug           Enable debugging output
  -o, --one-shot        Send the list of guest IDs and exit immediately
  -i INTERVAL, --interval=INTERVAL
                        Acquire and send list of virtual guest each N seconds
  -p, --print           Print the host/guest association obtained from
                        virtualization backend (implies oneshot)
  -c CONFIGS, --config=CONFIGS
                        Configuration file that will be processed, can be used

3. run virt-who with -b option
# virt-who -d -b -i 3

4. check virt-who PID
# ps -ef|grep virt-who
root     26983     1  0 10:39 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py -d -b -i 3
root     26984 26983  0 10:39 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py -d -b -i 3

5. check rhsm.log
2015-08-14 10:41:32,637 [INFO]  @subscriptionmanager.py:136 - Sending domain info: [
        "guestId": "04d4c7ba-4fd3-432c-b59a-91e72e7edff8", 
        "state": 5, 
        "attributes": {
            "active": 0, 
            "virtWhoType": "libvirt", 
            "hypervisorType": "QEMU"
        "guestId": "5262e779-29c6-4331-a344-c46e78012425", 
        "state": 5, 
        "attributes": {
            "active": 0, 
            "virtWhoType": "libvirt", 
            "hypervisorType": "QEMU"
        "guestId": "95572a0b-390a-4364-ae96-a48c5134d47d", 
        "state": 1, 
        "attributes": {
            "active": 1, 
            "virtWhoType": "libvirt", 
            "hypervisorType": "QEMU"
2015-08-14 10:41:34,324 [DEBUG]  @libvirtd.py:210 - Virtual machine found: rhel7.0: 95572a0b-390a-4364-ae96-a48c5134d47d
2015-08-14 10:41:34,325 [DEBUG]  @libvirtd.py:216 - Virtual machine found: rhel7.0-backup: 5262e779-29c6-4331-a344-c46e78012425
2015-08-14 10:41:34,325 [DEBUG]  @libvirtd.py:216 - Virtual machine found: rhel7.0-clone-test: 04d4c7ba-4fd3-432c-b59a-91e72e7edff8
2015-08-14 10:41:34,325 [DEBUG]  @libvirtd.py:220 - Libvirt domains found: ['95572a0b-390a-4364-ae96-a48c5134d47d', '5262e779-29c6-4331-a344-c46e78012425', '04d4c7ba-4fd3-432c-b59a-91e72e7edff8']
2015-08-14 10:41:36,377 [INFO]  @virtwho.py:190 - virt-who guest list update successful

Actual results:
no -b or VIRTWHO_BACKGROUND for virt-who, but virt-who still can be executed with -b option

Expected results:
if the -b or VIRTWHO_BACKGROUND is not available, virt-who shouldn't be executed with -b

Additional info:
Comment 2 Radek Novacek 2015-08-18 11:57:18 EDT
Fixed in virt-who-0.14-4.el7.
Comment 4 Liushihui 2015-08-25 03:52:00 EDT
Verified it on virt-who-0.14-4.el7 since all -b related function has been removed

Verified version

Verified process:
1. Register system to SAM
2. Stop virt-who service.
3. Run virt-who with -b, it will show error info
[root@ibm-hs22-01 ~]# systemctl stop virt-who
[root@ibm-hs22-01 ~]# virt-who -b -d 
Usage: virt-who [-d] [-i INTERVAL] [-o] [--sam|--satellite5|--satellite6] [--libvirt|--vdsm|--esx|--rhevm|--hyperv]

virtwho.py: error: no such option: -b
[root@ibm-hs22-01 ~]# ps -ef|grep virt-who
root      9305  8546  0 09:48 pts/0    00:00:00 grep --color=auto virt-who

-b option has been removed, it can't run virt-who with -b option
Comment 5 errata-xmlrpc 2015-11-19 06:57:49 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.


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