Bug 1300512
Summary: | oneshot mode doesn't work when starting as service | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Liushihui <shihliu> |
Component: | virt-who | Assignee: | Radek Novacek <rnovacek> |
Status: | CLOSED ERRATA | QA Contact: | Eko <hsun> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.8 | CC: | gxing, hsun, ovasik, rbalakri, sgao, shihliu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | virt-who-0.16-2.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-05-10 23:57:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Liushihui
2016-01-21 03:30:52 UTC
The background mode is still needed internally on RHEL-6. When a service is started using `service virt-who start` it should do a double-fork to detach from the terminal. This is original purpose of background mode. There is (and will be) environment variable VIRTWHO_BACKGROUND that is set up by the initscript that will do the double-fork in virt-who. On RHEL-7 the double-fork is not needed as systemd can handle it directly. Nevertheless the conflict between oneshot and background mode is no longer valid, so I'll remove it. *** Bug 1294760 has been marked as a duplicate of this bug. *** Fixed in virt-who-0.16-2.el6. Verified it on virt-who-0.16-3.el6.noarch since virt-who can send h/g mapping when VIRTWHO_DEBUG=1 and VIRTWHO_ONE_SHOT=1 in /etc/sysconfig/virt-who. The log file as the following: 2016-02-04 02:19:27,915 [virtwho.init INFO] MainProcess(13530):MainThread @virtwho.py:parseOptions:630 - Using reporter_id='intel-canoepass-10.lab.bos.redhat.com' 2016-02-04 02:19:27,917 [virtwho.init INFO] MainProcess(13530):MainThread @virtwho.py:main:714 - No configurations found, using libvirt as backend 2016-02-04 02:19:27,917 [virtwho.init INFO] MainProcess(13530):MainThread @virtwho.py:main:721 - Using configuration "env/cmdline" ("libvirt" mode) 2016-02-04 02:19:28,078 [virtwho.env_cmdline DEBUG] Libvirtd-1(13539):MainThread @virt.py:run:358 - Virt backend 'env/cmdline' started 2016-02-04 02:19:28,081 [virtwho.env_cmdline INFO] Libvirtd-1(13539):MainThread @libvirtd.py:_connect:156 - Using libvirt url: "" 2016-02-04 02:19:28,109 [virtwho.env_cmdline DEBUG] Libvirtd-1(13539):MainThread @libvirtd.py:_listDomains:236 - Libvirt domains found: 9ebbeb2c-e391-b586-1d29-5e579c190a31 2016-02-04 02:19:28,110 [virtwho.env_cmdline DEBUG] Libvirtd-1(13539):MainThread @virt.py:enqueue:351 - Report gathered, putting to queue for sending 2016-02-04 02:19:28,126 [virtwho.main DEBUG] MainProcess(13533):MainThread @subscriptionmanager.py:_connect:121 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2016-02-04 02:19:28,324 [virtwho.main INFO] MainProcess(13533):MainThread @subscriptionmanager.py:sendVirtGuests:147 - Sending update in guests lists for config "env/cmdline": 1 guests found 2016-02-04 02:19:28,324 [virtwho.main DEBUG] MainProcess(13533):MainThread @subscriptionmanager.py:sendVirtGuests:148 - Domain info: [ { "guestId": "9ebbeb2c-e391-b586-1d29-5e579c190a31", "state": 5, "attributes": { "active": 0, "hypervisorVersion": "0.12.1", "virtWhoType": "libvirt", "hypervisorType": "QEMU" } } ] 2016-02-04 02:19:29,113 [virtwho.env_cmdline DEBUG] Libvirtd-1(13539):MainThread @virt.py:run:377 - Virt backend 'env/cmdline' stopped after sending one report 2016-02-04 02:19:30,772 [virtwho.main DEBUG] MainProcess(13533):MainThread @virtwho.py:send_current_report:159 - Report for config "env/cmdline" sent 2016-02-04 02:19:30,774 [virtwho.main DEBUG] MainProcess(13533):MainThread @virtwho.py:<module>:805 - virt-who terminated 2016-02-04 02:19:30,774 [virtwho.main DEBUG] MainProcess(13533):MainThread @virtwho.py:terminate:352 - virt-who is shutting down 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/RHEA-2016-0859.html |