Bug 1229211
| Summary: | virt-who can't synchronise guest's info updating instantly when virt-who run at libvirt mode and refresh interval< 10s | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Liushihui <shihliu> | |
| Component: | virt-who | Assignee: | Radek Novacek <rnovacek> | |
| Status: | CLOSED ERRATA | QA Contact: | gaoshang <sgao> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 6.7 | CC: | gxing, hsun, ovasik, rbalakri, sgao | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | virt-who-0.16-1.el6 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1246374 (view as bug list) | Environment: | ||
| Last Closed: | 2016-05-10 23:55:27 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1246374 | |||
When setting VIRTWHO_INTERVAL less than 10s, virt-who's actually refresh interval is not accurate. for example, when VIRTWHO_INTERVAL=5s, virt-who usually refresh after about 10-20s. please see the detail as the following:
[root@hp-z220-07 ~]# tail -f /var/log/rhsm/rhsm.log | grep "Sending domain info"
2015-06-17 17:34:06,450 [INFO] @subscriptionmanager.py:117 - Sending domain info: [{'guestId': 'a3c81316-6029-4dcf-a3fc-e4465d009564', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}, {'guestId': 'aff0c98d-d090-433d-beb5-25f120281d9e', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}, {'guestId': 'bdd11d83-9b28-458f-9a4f-899ef5d25a41', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}]
2015-06-17 17:34:24,657 [INFO] @subscriptionmanager.py:117 - Sending domain info: [{'guestId': 'a3c81316-6029-4dcf-a3fc-e4465d009564', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}, {'guestId': 'aff0c98d-d090-433d-beb5-25f120281d9e', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}, {'guestId': 'bdd11d83-9b28-458f-9a4f-899ef5d25a41', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}]
2015-06-17 17:34:38,253 [INFO] @subscriptionmanager.py:117 - Sending domain info: [{'guestId': 'a3c81316-6029-4dcf-a3fc-e4465d009564', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}, {'guestId': 'aff0c98d-d090-433d-beb5-25f120281d9e', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}, {'guestId': 'bdd11d83-9b28-458f-9a4f-899ef5d25a41', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}]
2015-06-17 17:34:52,361 [INFO] @subscriptionmanager.py:117 - Sending domain info: [{'guestId': 'a3c81316-6029-4dcf-a3fc-e4465d009564', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}, {'guestId': 'aff0c98d-d090-433d-beb5-25f120281d9e', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}, {'guestId': 'bdd11d83-9b28-458f-9a4f-899ef5d25a41', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}]
There will be significant change how the interval works in following version of virt-who: https://github.com/virt-who/virt-who/wiki/Interval-changes It means that this bug can't be fixed directly and it might not apply to the new version. I will let this bug open to check if the new behaviour is appropriate. Fixed by rebase to virt-who-0.16-1.el6. Verified it on virt-who-0.16-4.el6.noarch since virt-who's refresh interval has updated to 60s when setting VIRTWHO_INTERVAL lsss than 60s. Therefore, verified it. 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 |
Description of problem: when virt-who run at libvirt mode and interval < 10s , start/stop/resume/pause/add/delete guest, although Libvirt domains found guest's status's updating, virt-who still can't syn these updating immediately. Version-Release number of selected component (if applicable): subscription-manager-1.14.9-1.el6.x86_64 python-rhsm-1.14.3-1.el6.x86_64 virt-who-0.12-9.el6.noarch How reproducible: Always Steps to Reproduce: 1. Register to Satellite/SAM, configure virt-who run at libvirt mode # cat /etc/sysconfig/virt-who VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=1 VIRTWHO_INTERVAL=5 2. Start guest , then check the virt-who's log 3. Stop guest, monitor the guest's status's updating process. # tail -f /var/log/rhsm/rhsm.log 2015-06-08 17:12:47,841 [INFO] @virtwho.py:130 - virt-who guest list update successful 2015-06-08 17:12:47,845 [DEBUG] @subscriptionmanager.py:75 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2015-06-08 17:12:50,371 [INFO] @subscriptionmanager.py:116 - Sending domain info: [{'guestId': '9b571ee2-d95f-49a2-2f4d-331743facf0d', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}] 2015-06-08 17:12:52,853 [DEBUG] @libvirtd.py:193 - Virtual machine found: 6.5_Server_x86_64: 9b571ee2-d95f-49a2-2f4d-331743facf0d 2015-06-08 17:12:52,854 [DEBUG] @libvirtd.py:203 - Libvirt domains found: [{'guestId': '9b571ee2-d95f-49a2-2f4d-331743facf0d', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}] 2015-06-08 17:12:53,709 [DEBUG] @libvirtd.py:193 - Virtual machine found: 6.5_Server_x86_64: 9b571ee2-d95f-49a2-2f4d-331743facf0d ===========guest is pause, Libvirt domains found guest's status is "3"======== 2015-06-08 17:12:53,710 [DEBUG] @libvirtd.py:203 - Libvirt domains found: [{'guestId': '9b571ee2-d95f-49a2-2f4d-331743facf0d', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 3}] 2015-06-08 17:12:56,868 [INFO] @virtwho.py:130 - virt-who guest list update successful 2015-06-08 17:12:56,871 [DEBUG] @subscriptionmanager.py:75 - Authenticating with certificate: /etc/pki/consumer/cert.pem ===========After 3s,virt-who still send the guest's status is "1"============ 2015-06-08 17:13:00,072 [INFO] @subscriptionmanager.py:116 - Sending domain info: [{'guestId': '9b571ee2-d95f-49a2-2f4d-331743facf0d', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}] 2015-06-08 17:13:01,878 [DEBUG] @libvirtd.py:193 - Virtual machine found: 6.5_Server_x86_64: 9b571ee2-d95f-49a2-2f4d-331743facf0d 2015-06-08 17:13:01,879 [DEBUG] @libvirtd.py:203 - Libvirt domains found: [{'guestId': '9b571ee2-d95f-49a2-2f4d-331743facf0d', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 3}] 2015-06-08 17:13:06,455 [INFO] @virtwho.py:130 - virt-who guest list update successful 2015-06-08 17:13:06,458 [DEBUG] @subscriptionmanager.py:75 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2015-06-08 17:13:06,460 [DEBUG] @libvirtd.py:193 - Virtual machine found: 6.5_Server_x86_64: 9b571ee2-d95f-49a2-2f4d-331743facf0d 2015-06-08 17:13:06,461 [DEBUG] @libvirtd.py:203 - Libvirt domains found: [{'guestId': '9b571ee2-d95f-49a2-2f4d-331743facf0d', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 3}] ===========After 15s, virt-who still send the guest's status is "1"=========== 2015-06-08 17:13:08,966 [INFO] @subscriptionmanager.py:116 - Sending domain info: [{'guestId': '9b571ee2-d95f-49a2-2f4d-331743facf0d', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}] Actual results: Although libvirt domain found guest's updating , after 15s, virt-who still hasn't synchronized guest's updating. Expected results: Virt-who should monitored the guest's updating instantly. Additional info: