RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1230041 - virt-who refresh interval is 15min although setting interval 1 hour
Summary: virt-who refresh interval is 15min although setting interval 1 hour
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: gaoshang
URL:
Whiteboard:
: 1308786 (view as bug list)
Depends On:
Blocks: 1247928
TreeView+ depends on / blocked
 
Reported: 2015-06-10 07:43 UTC by Liushihui
Modified: 2016-12-01 00:34 UTC (History)
5 users (show)

Fixed In Version: virt-who-0.16-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1247928 (view as bug list)
Environment:
Last Closed: 2016-05-10 23:55:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0859 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2016-05-10 22:44:47 UTC

Description Liushihui 2015-06-10 07:43:27 UTC
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

Comment 2 Radek Novacek 2015-06-11 06:38:56 UTC
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.

Comment 3 Radek Novacek 2015-09-29 10:32:39 UTC
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.

Comment 4 Radek Novacek 2015-12-17 12:28:19 UTC
Fixed by rebase to virt-who-0.16-1.el6.

Comment 6 Eko 2016-02-16 05:34:27 UTC
*** Bug 1308786 has been marked as a duplicate of this bug. ***

Comment 7 Eko 2016-02-16 05:37:20 UTC
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

Comment 8 Radek Novacek 2016-02-18 10:09:17 UTC
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.

Comment 9 Radek Novacek 2016-02-25 15:41:21 UTC
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.

Comment 11 Liushihui 2016-03-16 08:27:43 UTC
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.

Comment 13 errata-xmlrpc 2016-05-10 23:55:35 UTC
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


Note You need to log in before you can comment on or make changes to this bug.