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 1294760 - set VIRTWHO_ONE_SHOT=1 in /etc/sysconfig/virt-who, virt-who will not exit
Summary: set VIRTWHO_ONE_SHOT=1 in /etc/sysconfig/virt-who, virt-who will not exit
Keywords:
Status: CLOSED DUPLICATE of bug 1300512
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.8
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-30 07:14 UTC by Eko
Modified: 2016-12-01 00:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-28 10:23:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eko 2015-12-30 07:14:30 UTC
Description of problem:
if I set VIRTWHO_ONE_SHOT=1 in /etc/sysconfig/virt-who for one shot, virt-who will not exit immediately

Version-Release number of selected component (if applicable):
virt-who-0.16-1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. set VIRTWHO_ONE_SHOT=1 in /etc/sysconfig/virt-who
VIRTWHO_DEBUG=1
VIRTWHO_ONE_SHOT=1
VIRTWHO_LIBVIRT=1
VIRTWHO_LIBVIRT_OWNER=ACME_Corporation
VIRTWHO_LIBVIRT_ENV=Library
VIRTWHO_LIBVIRT_SERVER=10.66.144.8
VIRTWHO_LIBVIRT_USERNAME=root
VIRTWHO_LIBVIRT_PASSWORD=redhat


2. restart virt-who service and check the rhsm.log
# /etc/init.d/virt-who restart
# tail -f /var/log/rhsm/rhsm.log
2015-12-30 15:06:29,652 [virtwho.main DEBUG] MainProcess(23172):MainThread @subscriptionmanager.py:hypervisorCheckIn:171 - Host-to-guest mapping: {
    "80804c56-82fb-e111-a260-b4b52fcb471e": [
        {
            "guestId": "cb33ddce-fd1e-0e6a-7e7f-d3c6fca67ede", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "hypervisorVersion": "0.12.1", 
                "virtWhoType": "libvirt", 
                "hypervisorType": "QEMU"
            }
        }
    ]
}
2015-12-30 15:06:29,960 [virtwho.main DEBUG] MainProcess(23172):MainThread @virtwho.py:send_current_report:206 - Report for config "env/cmdline" sent


3. check the virt-who service
# ps -ef|grep virtwho
root     23172     1  0 15:06 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py
root     23180 23172  0 15:06 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py

===> virt-who will not exit 

4. pause or poweroff guest, and check the rhsm.log
2015-12-30 15:10:30,107 [virtwho.main DEBUG] MainProcess(23172):MainThread @subscriptionmanager.py:hypervisorCheckIn:171 - Host-to-guest mapping: {
    "80804c56-82fb-e111-a260-b4b52fcb471e": [
        {
            "guestId": "cb33ddce-fd1e-0e6a-7e7f-d3c6fca67ede", 
            "state": 3, 
            "attributes": {
                "active": 1, 
                "hypervisorVersion": "0.12.1", 
                "virtWhoType": "libvirt", 
                "hypervisorType": "QEMU"
            }
        }
    ]
}
2015-12-30 15:10:30,397 [virtwho.main DEBUG] MainProcess(23172):MainThread @virtwho.py:send_current_report:206 - Report for config "env/cmdline" sent

===> virt-who still can send the json info for update


Actual results:
VIRTWHO_ONE_SHOT=1 is invalid in /etc/sysconfig/virt-who, still can send the updated json info

Expected results:
if set VIRTWHO_ONE_SHOT=1 in /etc/sysconfig/virt-who, virt-who should be run one shot

Additional info:

Comment 2 Radek Novacek 2016-01-28 10:23:18 UTC

*** This bug has been marked as a duplicate of bug 1300512 ***


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