Bug 1230041
| Summary: | virt-who refresh interval is 15min although setting interval 1 hour | |||
|---|---|---|---|---|
| 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-6.el6 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1247928 (view as bug list) | Environment: | ||
| Last Closed: | 2016-05-10 23:55:35 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: | 1247928 | |||
There is a limit of maximal time that virt-who can wait for ESX event. It's limited by ESX configuration and TCP connection timeout. It would be possible to start new wait right after this timeout and don't send the report if nothing have changed. I don't see this issue as critical, moving to 6.8. 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. *** Bug 1308786 has been marked as a duplicate of this bug. *** this issue can be duplicated in virt-who-0.16-3.el6.noarch,the interval value is 3600s, but the really loop time is 900s.
1. config VIRTWHO_INTERVAL to 3600, such as:
VIRTWHO_INTERVAL=3600
VIRTWHO_ESX=1
VIRTWHO_ESX_OWNER=ACME_Corporation
VIRTWHO_ESX_ENV=Library
VIRTWHO_ESX_SERVER=10.73.2.95
VIRTWHO_ESX_USERNAME=Administrator
VIRTWHO_ESX_PASSWORD=Welcome1!
2. restart virt-who service
# /etc/init.d/virt-who restart
3. check rhsm.log
# tail -f /var/log/rhsm/rhsm.log
2016-02-16 11:46:34,541 [virtwho.init INFO] MainProcess(5322):MainThread @virtwho.py:parseOptions:630 - Using reporter_id='hp-z220-09.qe.lab.eng.nay.redhat.com'
2016-02-16 11:46:34,543 [virtwho.init INFO] MainProcess(5322):MainThread @virtwho.py:main:721 - Using configuration "env/cmdline" ("esx" mode)
2016-02-16 11:46:34,544 [virtwho.main DEBUG] MainProcess(5322):MainThread @virtwho.py:run:229 - Starting infinite loop with 3600 seconds interval
2016-02-16 11:46:34,646 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @virt.py:run:358 - Virt backend 'env/cmdline' started
2016-02-16 11:46:34,647 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @esx.py:_prepare:55 - Log into ESX
2016-02-16 11:46:34,967 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @esx.py:_prepare:58 - Creating ESX event filter
2016-02-16 11:46:35,115 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @virt.py:enqueue:351 - Report gathered, putting to queue for sending
2016-02-16 11:46:35,115 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @esx.py:_run:150 - Waiting for ESX changes
2016-02-16 11:46:35,130 [virtwho.main DEBUG] MainProcess(5322):MainThread @subscriptionmanager.py:_connect:121 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-02-16 11:46:35,357 [virtwho.main DEBUG] MainProcess(5322):MainThread @subscriptionmanager.py:hypervisorCheckIn:162 - Checking if server has capability 'hypervisor_async'
2016-02-16 11:46:35,545 [virtwho.main DEBUG] MainProcess(5322):MainThread @subscriptionmanager.py:hypervisorCheckIn:174 - Server does not have 'hypervisors_async' capability
2016-02-16 11:46:35,546 [virtwho.main INFO] MainProcess(5322):MainThread @subscriptionmanager.py:hypervisorCheckIn:185 - Sending update in hosts-to-guests mapping for config "env/cmdline": 1 hypervisors and 1 guests found
2016-02-16 11:46:35,547 [virtwho.main DEBUG] MainProcess(5322):MainThread @subscriptionmanager.py:hypervisorCheckIn:186 - Host-to-guest mapping: {
"3e504d56-3982-037b-f3e6-669289892fa1": [
{
"guestId": "42064eca-44da-56fa-1946-9b6f6cb67dab",
"state": 5,
"attributes": {
"active": 0,
"hypervisorVersion": "6.0.0",
"virtWhoType": "esx",
"hypervisorType": "VMware ESXi"
}
}
]
}
2016-02-16 11:46:35,812 [virtwho.main DEBUG] MainProcess(5322):MainThread @virtwho.py:send_current_report:159 - Report for config "env/cmdline" sent
=============== loop each 15 minutes, not 60 minutes =================
2016-02-16 12:01:35,217 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @esx.py:_run:150 - Waiting for ESX changes
2016-02-16 12:16:35,270 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @esx.py:_run:150 - Waiting for ESX changes
2016-02-16 12:31:35,350 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @esx.py:_run:150 - Waiting for ESX changes
Do you mean that the problem is that this is logged each 15 minutes? 2016-02-16 12:31:35,350 [virtwho.env_cmdline DEBUG] Esx-1(5329):MainThread @esx.py:_run:150 - Waiting for ESX changes There is not much we can do about it. This is property of ESX, client needs to reconnect before the connection times out. All I can do is to hide the message but I don't think it is necessary, it's just a debug message after all. virt-who should now show debug message once for each `interval` + time of getting the update itself. This applied for all hypervisors including those with event listening (libvirt and esx). Implemented in virt-who-0.16-6.el6. Verified it on virt-who-0.16-7.el6.noarch since virt-who will show debug info when up to long interval time(3600s), 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 virt-who run at esx mode and refresh interval is 3600s
[root@intel-piketon-01 ~]# cat /etc/sysconfig/virt-who | grep -v ^# | grep -v ^$
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=3600
VIRTWHO_ESX=1
VIRTWHO_ESX_OWNER=ACME_Corporation
VIRTWHO_ESX_ENV=Library
VIRTWHO_ESX_SERVER=10.73.2.95
VIRTWHO_ESX_USERNAME=Administrator
VIRTWHO_ESX_PASSWORD=Welcome1!
3. Restart virt-who and check virt-who's log
2016-03-16 02:32:47,636 [virtwho.main INFO] MainProcess(27656):MainThread @subscriptionmanager.py:hypervisorCheckIn:185 - Sending update in hosts-to-guests mapping for config "env/cmdline": 1 hypervisors and 1 guests found
2016-03-16 02:32:47,637 [virtwho.main DEBUG] MainProcess(27656):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:32:47,903 [virtwho.main DEBUG] MainProcess(27656):MainThread @virtwho.py:send_report:161 - Report for config "env/cmdline" sent
=============After 3600s,virt-who show debug info in the log===========
2016-03-16 03:32:48,918 [virtwho.env_cmdline DEBUG] Esx-1(27665):MainThread @virt.py:enqueue:351 - Report for config "env/cmdline" gathered, putting to queue for sending
2016-03-16 03:32:48,924 [virtwho.main INFO] MainProcess(27656):MainThread @virtwho.py:run:309 - Report for config "env/cmdline" hasn't changed, not sending
Result:
Virt-who send debug info after 3600s.
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 esx mode, setting virt-who refresh interval is 3600s, virt-who will refreshed every 15min 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 system to SAM server, configure virt-who run at esx mode and interval is 3600s [root@hp-z220-07 ~]# vim /etc/sysconfig/virt-who VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=1 [root@hp-z220-07 ~]# cat /etc/virt-who.d/virt [test-esx1] type=esx server=10.66.78.89 username=Administrator password=qwer1234P! owner=ACME_Corporation env=Library 2.Restart virt-who service and check virt-who's refresh interval 2015-06-10 10:25:43,810 [DEBUG] @virtwho.py:89 - Using config named 'test-esx1' 2015-06-10 10:25:43,811 [INFO] @virtwho.py:563 - Using configuration "test-esx1" ("esx" mode) 2015-06-10 10:25:43,835 [DEBUG] @virtwho.py:151 - Starting infinite loop with 3600 seconds interval 2015-06-10 10:25:43,974 [DEBUG] @esx.py:53 - Log into ESX 2015-06-10 10:25:44,389 [DEBUG] @esx.py:56 - Creating ESX event filter 2015-06-10 10:25:44,542 [DEBUG] @esx.py:127 - Waiting for ESX changes =======virt-who send host/guest association at the first time============== 2015-06-10 10:25:44,564 [INFO] @subscriptionmanager.py:123 - Sending update in hosts-to-guests mapping: {564d9431-d446-2c44-1f38-9e243363996d: [42392c06-c6ac-48ae-f984-279e18ff8571]} 2015-06-10 10:25:44,565 [DEBUG] @subscriptionmanager.py:75 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2015-06-10 10:25:47,330 [INFO] @virtwho.py:144 - Created host: c49a404c-3e08-4aea-a971-2ac5e046327d with guests: [42392c06-c6ac-48ae-f984-279e18ff8571] 2015-06-10 10:25:47,331 [INFO] @virtwho.py:147 - virt-who host/guest association update successful 2015-06-10 10:40:44,616 [DEBUG] @esx.py:127 - Waiting for ESX changes =======after 15min,virt-who send host/guest association at the second time===== 2015-06-10 10:40:44,633 [INFO] @subscriptionmanager.py:123 - Sending update in hosts-to-guests mapping: {564d9431-d446-2c44-1f38-9e243363996d: [42392c06-c6ac-48ae-f984-279e18ff8571]} 2015-06-10 10:40:44,633 [DEBUG] @subscriptionmanager.py:75 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2015-06-10 10:40:44,910 [INFO] @virtwho.py:147 - virt-who host/guest association update successful 2015-06-10 11:10:44,737 [DEBUG] @esx.py:92 - Wait for ESX event finished, timeout Actual results: virt-who's refresh interval is 15min Expected results: virt-who should refresh host/guest association every 1 hour Additional info: When virt-who run at HyperV mode, it hasn't this problem