Bug 1295644
Summary: | virt-who can't send two hypervisors' host/guests info at the same time, need to wait for 60s | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Eko <hsun> |
Component: | virt-who | Assignee: | Radek Novacek <rnovacek> |
Status: | CLOSED ERRATA | QA Contact: | Eko <hsun> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.8 | CC: | csnyder, ovasik, rbalakri, sgao, shihliu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | virt-who-0.16-6.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-05-10 23:57:12 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
Eko
2016-01-05 05:37:10 UTC
This is now expected behaviour. In order to prevent flooding the candlepin server, virt-who now limits how often it sends reports. By default reports are not sent more often than once per minute. For details please see: https://github.com/virt-who/virt-who/wiki/Interval-changes Hi radek, I agree with you, if the virt-who is running now, it's ok to check the reports update per minute. but when restart virt-who service, virt-who should send all the hypervisors json at the same time. Configure two hypervisors as example, such as: hypervisor_1 (kvm): host/guests json hypervisor_2 (esx): host/guests json after restart virt-who service, hypervisor_1 (kvm) will be sent immediately, but hypervisor_2 (esx) will be delaied 60 seconds. Sending all the hypervisor reports at the same time creates a lot of load in the candlepin and that is something we generally don't want to do. Although I agree that from user perspective it would be better to send both reports asap, that's something that candlepin doesn't want. if the customer create 100 config files in /etc/virt-who.d/, it will take 100 minutes to open all the config files and send the host/guests json. if change the Interval value to 120 seconds, it will take 200 minutes to polling one time. Chris, what do you think would be correct behavior in this case? Let the customer wait for initial run too long doesn't seem right. OTOH the load for candlepin can be quite high, given how big environments customers have. I don't know how many configs our users have. I don't think I saw more than 2 configs on one virt-who instance, but I'm not in touch with our customers. Eko, do you have an idea? Chris, how about sending the first batch immediately when virt-who is starting and apply the rate limit after one report for each config is sent. It would be better from user perspective and candlepin can still reply with 429 - then virt-who will delay all future reports (even if the first batch isn't finished). Is this solution acceptable? Radek, That sounds reasonable to me. Thanks, Chris Fixed in virt-who-0.16-6.el6. Verified it on virt-who-0.16-7.el6.noarch since virt-who can get multi esx/rhevm/hyperv/remote libvirt mapping info and send it to server side immediately. Therefore, verify it. Verified version: virt-who-0.16-7.el6.noarch python-rhsm-1.16.6-1.el6.x86_64 subscription-manager-1.16.8-4.el6.x86_64 Verified process: 1. Register system to satellite6.1 2. Configure two type of mode in /etc/virt-who.d/ [root@intel-piketon-01 ~]# cat /etc/virt-who.d/virt [test-rhevm1] type=rhevm server=https://10.73.2.65:443 username=admin@internal password=redhat owner=ACME_Corporation env=Library [root@intel-piketon-01 ~]# cat /etc/virt-who.d/esx [test-esx1] type=esx server=10.73.2.95 username=Administrator password=Welcome1! owner=ACME_Corporation env=Library 3. Restart virt-who service and check virt-who's log [root@intel-piketon-01 ~]# service virt-who restart && tail -f /var/log/rhsm/rhsm.log Stopping virt-who: [ OK ] Starting virt-who: [ OK ] .............. 2016-03-16 02:21:04,047 [virtwho.init INFO] MainProcess(27419):MainThread @virtwho.py:parseOptions:637 - Using reporter_id='intel-piketon-01.lab.bos.redhat.com' 2016-03-16 02:21:04,051 [virtwho.init DEBUG] MainProcess(27419):MainThread @virtwho.py:__init__:125 - Using config named 'test-esx1' 2016-03-16 02:21:04,051 [virtwho.init DEBUG] MainProcess(27419):MainThread @virtwho.py:__init__:125 - Using config named 'test-rhevm1' 2016-03-16 02:21:04,051 [virtwho.init INFO] MainProcess(27419):MainThread @virtwho.py:main:729 - Using configuration "test-esx1" ("esx" mode) 2016-03-16 02:21:04,051 [virtwho.init INFO] MainProcess(27419):MainThread @virtwho.py:main:729 - Using configuration "test-rhevm1" ("rhevm" mode) 2016-03-16 02:21:04,067 [virtwho.main DEBUG] MainProcess(27421):MainThread @virtwho.py:run:231 - Starting infinite loop with 60 seconds interval 2016-03-16 02:21:04,186 [virtwho.test-esx1 DEBUG] Esx-1(27430):MainThread @virt.py:run:358 - Virt backend 'test-esx1' started 2016-03-16 02:21:04,187 [virtwho.test-esx1 DEBUG] Esx-1(27430):MainThread @esx.py:_prepare:55 - Log into ESX 2016-03-16 02:21:04,190 [virtwho.test-rhevm1 DEBUG] RhevM-2(27432):MainThread @virt.py:run:358 - Virt backend 'test-rhevm1' started 2016-03-16 02:21:07,735 [virtwho.test-esx1 DEBUG] Esx-1(27430):MainThread @esx.py:_prepare:58 - Creating ESX event filter 2016-03-16 02:21:08,435 [virtwho.test-rhevm1 DEBUG] RhevM-2(27432):MainThread @virt.py:enqueue:351 - Report for config "test-rhevm1" gathered, putting to queue for sending 2016-03-16 02:21:08,453 [virtwho.main DEBUG] MainProcess(27421):MainThread @subscriptionmanager.py:_connect:121 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2016-03-16 02:21:08,642 [virtwho.main DEBUG] MainProcess(27421):MainThread @subscriptionmanager.py:hypervisorCheckIn:162 - Checking if server has capability 'hypervisor_async' 2016-03-16 02:21:08,785 [virtwho.main DEBUG] MainProcess(27421):MainThread @subscriptionmanager.py:hypervisorCheckIn:174 - Server does not have 'hypervisors_async' capability 2016-03-16 02:21:08,786 [virtwho.main INFO] MainProcess(27421):MainThread @subscriptionmanager.py:hypervisorCheckIn:185 - Sending update in hosts-to-guests mapping for config "test-rhevm1": 2 hypervisors and 1 guests found 2016-03-16 02:21:08,786 [virtwho.main DEBUG] MainProcess(27421):MainThread @subscriptionmanager.py:hypervisorCheckIn:186 - Host-to-guest mapping: { "fd26642f-62f5-4075-adce-3359e5a8bd10": [ { "guestId": "a11f0b29-b430-4a53-978a-cae879ad1ef3", "state": 1, "attributes": { "active": 1, "hypervisorVersion": "", "virtWhoType": "rhevm", "hypervisorType": "qemu" } } ], "d64f48cc-5fda-45c3-a307-fa42ef1864c7": [] } 2016-03-16 02:21:09,057 [virtwho.main DEBUG] MainProcess(27421):MainThread @virtwho.py:send_report:161 - Report for config "test-rhevm1" sent 2016-03-16 02:21:11,114 [virtwho.test-esx1 DEBUG] Esx-1(27430):MainThread @virt.py:enqueue:351 - Report for config "test-esx1" gathered, putting to queue for sending 2016-03-16 02:21:11,118 [virtwho.main DEBUG] MainProcess(27421):MainThread @subscriptionmanager.py:_connect:121 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2016-03-16 02:21:11,286 [virtwho.main DEBUG] MainProcess(27421):MainThread @subscriptionmanager.py:hypervisorCheckIn:162 - Checking if server has capability 'hypervisor_async' 2016-03-16 02:21:11,616 [virtwho.main DEBUG] MainProcess(27421):MainThread @subscriptionmanager.py:hypervisorCheckIn:174 - Server does not have 'hypervisors_async' capability 2016-03-16 02:21:11,616 [virtwho.main INFO] MainProcess(27421):MainThread @subscriptionmanager.py:hypervisorCheckIn:185 - Sending update in hosts-to-guests mapping for config "test-esx1": 1 hypervisors and 1 guests found 2016-03-16 02:21:11,617 [virtwho.main DEBUG] MainProcess(27421):MainThread @subscriptionmanager.py:hypervisorCheckIn:186 - Host-to-guest mapping: { "86b2bd00-8bad-11e2-87f4-6c3be514699d": [ { "guestId": "42060bb0-044b-dd8c-c111-361bb5b2f78c", "state": 5, "attributes": { "active": 0, "hypervisorVersion": "6.0.0", "virtWhoType": "esx", "hypervisorType": "VMware ESXi" } } ] } 2016-03-16 02:21:11,917 [virtwho.main DEBUG] MainProcess(27421):MainThread @virtwho.py:send_report:161 - Report for config "test-esx1" sent Result: Virt-who can send multi host/guest mapping info to server immediately. Note: Configure multi server/mode in /etc/sysconfig/virt-who and /etc/virt-who.d/, virt-who also can send mapping info simultaneously. 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 |