Bug 1294760 - set VIRTWHO_ONE_SHOT=1 in /etc/sysconfig/virt-who, virt-who will not exit
set VIRTWHO_ONE_SHOT=1 in /etc/sysconfig/virt-who, virt-who will not exit
Status: CLOSED DUPLICATE of bug 1300512
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who (Show other bugs)
6.8
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Radek Novacek
Eko
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-30 02:14 EST by Eko
Modified: 2016-11-30 19:35 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-28 05:23:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eko 2015-12-30 02:14:30 EST
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 05:23:18 EST

*** 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.