RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1253533 - virt-who still can be executed at background with -b option, but no -b or VIRTWHO_BACKGROUND any more
Summary: virt-who still can be executed at background with -b option, but no -b or VIR...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: xingge
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-14 03:03 UTC by Eko
Modified: 2016-12-01 00:35 UTC (History)
6 users (show)

Fixed In Version: virt-who-0.14-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 11:57:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2370 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2015-11-19 10:39:27 UTC

Description Eko 2015-08-14 03:03:56 UTC
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:
always

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

Options:
  -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 15:57:18 UTC
Fixed in virt-who-0.14-4.el7.

Comment 4 Liushihui 2015-08-25 07:52:00 UTC
Verified it on virt-who-0.14-4.el7 since all -b related function has been removed

Verified version
virt-who-0.14-4.el7.noarch
subscription-manager-1.15.9-6.el7.x86_64
python-rhsm-1.15.4-2.el7.x86_64
SAM-1.4.1-RHEL-6-20141113.0

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


Result:
-b option has been removed, it can't run virt-who with -b option

Comment 5 errata-xmlrpc 2015-11-19 11:57:49 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.

https://rhn.redhat.com/errata/RHBA-2015-2370.html


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