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 1366999

Summary: Generate redundant remind info when virt-who work at xen mode
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.3CC: ldai, ovasik, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-who-0.17-10.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:10:30 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 2016-08-15 08:45:34 UTC
Description of problem:
When virt-who work at xen mode, virt-who will generate redundant info when no updating info in xenserver.

Version-Release number of selected component (if applicable):
virt-who-0.17-8.el7.noarch
subscription-manager-1.17.10-1.el7.x86_64
python-rhsm-1.17.6-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Register system to satellite5.7.
2. Configure virt-who run at xen mode and restart virt-who service.
[root@hp-z220-03 virt-who.d]# cat /etc/virt-who.d/xen 
[test-xen]
type=xen
server=10.73.5.232
username=root
password=Welcome1
owner=ACME_Corporation
env=Library
sat_server=10.73.3.209
sat_username=admin
sat_password=redhat
[root@hp-z220-03 virt-who.d]# cat /etc/sysconfig/virt-who  | grep -v ^# | grep -v ^$
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=120
[root@hp-z220-03 virt-who.d]# service virt-who restart

3. Make sure it hasn't any updating in xenserver. After refresh interval(120s), check virt-who's log
[root@hp-z220-03 ~]# tail -f /var/log/rhsm/rhsm.log
=======================The first time===================================
2016-08-15 04:29:10,412 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 4d0c2b83-db73-454b-885f-7acfe4530a3c is ignored
2016-08-15 04:29:10,466 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 08e0ada5-04f6-49ab-b703-0eed24587ba8 is ignored
2016-08-15 04:29:10,466 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @virt.py:enqueue:357 - Report for config "test-xen" gathered, putting to queue for sending
2016-08-15 04:29:10,468 [virtwho.main INFO] MainProcess(26769):MainThread @executor.py:run:250 - Report for config "test-xen" hasn't changed, not sending

=======================The Second time===================================
2016-08-15 04:29:10,987 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 4d0c2b83-db73-454b-885f-7acfe4530a3c is ignored
2016-08-15 04:29:11,042 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 08e0ada5-04f6-49ab-b703-0eed24587ba8 is ignored
2016-08-15 04:29:11,043 [virtwho.main INFO] MainProcess(26769):MainThread @executor.py:run:250 - Report for config "test-xen" hasn't changed, not sending
2016-08-15 04:29:11,042 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @virt.py:enqueue:357 - Report for config "test-xen" gathered, putting to queue for sending

Actual results:
Virt-who will generate the same remind info twice when it up to refresh interval.

Expected results:
1. Virt-who should show remind info once.
"2016-08-15 04:29:11,043 [virtwho.main INFO] MainProcess(26769):MainThread @executor.py:run:250 - Report for config "test-xen" hasn't changed, not sending
2016-08-15 04:29:11,042 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @virt.py:enqueue:357 - Report for config "test-xen" gathered, putting to queue for sending"

2. The following info needn't to show when it up to refresh interval.
"2016-08-15 04:29:10,987 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 4d0c2b83-db73-454b-885f-7acfe4530a3c is ignored
2016-08-15 04:29:11,042 [virtwho.test-xen DEBUG] Xen-1(26776):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 08e0ada5-04f6-49ab-b703-0eed24587ba8 is ignored"

Additional info:
In rhevm mode, virt-who only show remind info once at the same situation.
"2016-08-15 04:26:23,858 [virtwho.test-rhevm1 DEBUG] RhevM-1(26633):MainThread @virt.py:enqueue:357 - Report for config "test-rhevm1" gathered, putting to queue for sending
2016-08-15 04:26:23,859 [virtwho.main INFO] MainProcess(26626):MainThread @executor.py:run:250 - Report for config "test-rhevm1" hasn't changed, not sending
"

Comment 1 Radek Novacek 2016-08-16 14:22:18 UTC
The fix for this issue is applied upstream:

https://github.com/virt-who/virt-who/commit/920eb8cf447b704439b056766c7aee4e5ced683a

Comment 2 Radek Novacek 2016-08-16 16:49:51 UTC
Fixed in virt-who-0.17-10.el7.

Comment 4 Liushihui 2016-08-31 02:57:10 UTC
Verified it on virt-who-0.17-10.el7 since virt-who won't generate redundant info in the log. Therefore, verify it.

Verified version:
virt-who-0.17-10.el7.noarch
subscription-manager-1.17.10-1.el7.x86_64
python-rhsm-1.17.6-1.el7.x86_64 

Verified process:
1. Register system to satellite5.7.
2. Configure virt-who run at xen mode and restart virt-who service.
[root@ibm-hs21-12 ~]# cat /etc/virt-who.d/xen 
[test-xen]
type=xen
server=10.73.5.232
username=root
password=Welcome1
owner=ACME_Corporation
env=Library
[root@ibm-hs21-12 ~]# cat /etc/sysconfig/virt-who  | grep -v ^# | grep -v ^$
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=120
[root@ibm-hs21-12 ~]# service virt-who restart

3. Make sure it hasn't any updating in xenserver. After refresh interval(120s), check virt-who's log
[root@ibm-hs21-12 ~]# tail -f /var/log/rhsm/rhsm.log 
2016-08-30 22:53:51,581 [virtwho.main INFO] MainProcess(31428):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Sending update in hosts-to-guests mapping for config "env/cmdline": 2 hypervisors and 0 guests found
2016-08-30 22:53:51,581 [virtwho.main DEBUG] MainProcess(31428):MainThread @subscriptionmanager.py:hypervisorCheckIn:196 - Host-to-guest mapping: {
    "17393006-db29-41c3-8c6e-9b221c2d33e1": [], 
    "14beb102-a9e3-41b6-84bb-338b1511e87d": []
}
2016-08-30 22:53:56,239 [virtwho.main DEBUG] MainProcess(31428):MainThread @executor.py:send_report:101 - Report for config "env/cmdline" sent


2016-08-30 22:54:56,255 [virtwho.main INFO] MainProcess(31428):MainThread @executor.py:run:250 - Report for config "env/cmdline" hasn't changed, not sending
2016-08-30 22:54:56,254 [virtwho.env_cmdline DEBUG] Xen-3(31630):MainThread @virt.py:enqueue:357 - Report for config "env/cmdline" gathered, putting to queue for sending

Result:
Virt-who won't generate redundant info in the log

Comment 6 errata-xmlrpc 2016-11-04 05:10:30 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/RHBA-2016-2387.html