Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1294764

Summary: virt-who can't send h/g mapping's updating after 60s when it run at vdsm/rhevm mode
Product: Red Hat Enterprise Linux 6 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED WORKSFORME QA Contact: Eko <hsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8CC: gxing, ovasik, rbalakri, sgao, shihliu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-14 06:08: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:

Description Liushihui 2015-12-30 08:00:16 UTC
Description of problem:
When virt-who run at vdsm/rhevm mode, During the first virt-who's loop interval(60s), add/delete/start/stop guest in rhevm, although virt-who get the updating at the first loop, it can't send the updating to server until the second loop(120s).

Version-Release number of selected component (if applicable):
virt-who-0.16-1.el6.noarch
subscription-manager-1.16.6-1.el6.x86_64
python-rhsm-1.16.4-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Register rhel to satellite6.1
2. Configure virt-who run at vdsm/rhevm mode, then start virt-who service
3. During the first loop, add/delete/start/stop guest in rhevm, then check virt-who's log:
# tail -f /var/log/rhsm/rhsm.log

Actual results:
Virt-who can't send the updating to server at the first loop time(60s). it will send the updating to server at the second loop(120s).

================The first loop========================
2015-12-30 02:27:35,423 [virtwho.env_cmdline DEBUG] Vdsm-1(8492):MainThread @virt.py:enqueue:331 - Report gathered, putting to queue for sending
2015-12-30 02:27:35,425 [virtwho.main DEBUG] MainProcess(8482):MainThread @virtwho.py:update_report_to_send:274 - Report for config "env/cmdline" updated

================The second loop========================
2015-12-30 02:28:34,931 [virtwho.main DEBUG] MainProcess(8482):MainThread @subscriptionmanager.py:_connect:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2015-12-30 02:28:35,536 [virtwho.env_cmdline DEBUG] Vdsm-1(8492):MainThread @virt.py:enqueue:331 - Report gathered, putting to queue for sending
2015-12-30 02:28:36,506 [virtwho.main INFO] MainProcess(8482):MainThread @subscriptionmanager.py:sendVirtGuests:136 - Sending domain info: [
    {
        "guestId": "95524370-81bb-4726-be53-112b67206093", 
        "state": 1, 
        "attributes": {
            "active": 1, 
            "hypervisorVersion": "", 
            "virtWhoType": "vdsm", 
            "hypervisorType": "qemu"
        }
    }
]
2015-12-30 02:28:39,377 [virtwho.main INFO] MainProcess(8482):MainThread @virtwho.py:_sendGuestList:250 - virt-who guest list update successful
2015-12-30 02:28:39,378 [virtwho.main DEBUG] MainProcess(8482):MainThread @virtwho.py:send_current_report:206 - Report for config "env/cmdline" sent
2015-12-30 02:28:39,380 [virtwho.main INFO] MainProcess(8482):MainThread @virtwho.py:update_report_to_send:268 - No change in report gathered using config: "env/cmdline", report not sent.

Expected results:
As virt-who has get the h/g mapping updating at the first loop, it should send the mapping's updating to server at the first loop.

Additional info:

Comment 1 Radek Novacek 2016-02-11 10:12:21 UTC
Can you please share whole virt-who configuration here? Do you have for example more virt backends configured?

Comment 2 Liushihui 2016-02-14 06:08:27 UTC
This problem cannot reproduced on the latest virt-who-0.16-3.el6.noarch. Therefore, close it as WORKSFORME. Thanks.
With the latest virt-who, virt-who can monitor updating in the second loop. Please see the detail as the following:
==================The first loop=============================
2016-02-14 01:02:55,356 [virtwho.main INFO] MainProcess(7827):MainThread @subscriptionmanager.py:sendVirtGuests:147 - Sending update in guests lists for config "env/cmdline": 0 guests found
2016-02-14 01:02:55,356 [virtwho.main DEBUG] MainProcess(7827):MainThread 
@subscriptionmanager.py:sendVirtGuests:148 - Domain info: []
2016-02-14 01:02:58,456 [virtwho.main DEBUG] MainProcess(7827):MainThread @virtwho.py:send_current_report:159 - Report for config "env/cmdline" sent
==================The second loop=============================

2016-02-14 01:03:55,153 [virtwho.env_cmdline DEBUG] Vdsm-1(7835):MainThread @virt.py:enqueue:351 - Report gathered, putting to queue for sending
2016-02-14 01:03:59,459 [virtwho.main DEBUG] MainProcess(7827):MainThread @subscriptionmanager.py:_connect:121 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-02-14 01:04:00,319 [virtwho.main INFO] MainProcess(7827):MainThread @subscriptionmanager.py:sendVirtGuests:147 - Sending update in guests lists for config "env/cmdline": 1 guests found
2016-02-14 01:04:00,319 [virtwho.main DEBUG] MainProcess(7827):MainThread @subscriptionmanager.py:sendVirtGuests:148 - Domain info: [
    {
        "guestId": "855e1a87-9d8c-48a6-b943-864d4c2f2bb9", 
        "state": 1, 
        "attributes": {
            "active": 1, 
            "hypervisorVersion": "", 
            "virtWhoType": "vdsm", 
            "hypervisorType": "qemu"
        }
    }
]
2016-02-14 01:04:02,526 [virtwho.main DEBUG] MainProcess(7827):MainThread @virtwho.py:send_current_report:159 - Report for config "env/cmdline" sent
2016-02-14 01:04:55,281 [virtwho.env_cmdline DEBUG] Vdsm-1(7835):MainThread @virt.py:enqueue:351 - Report gathered, putting to queue for sending