Bug 1415064 - [Virt-who] hypervisor_id config can't work when virt-who run at xen mode
Summary: [Virt-who] hypervisor_id config can't work when virt-who run at xen mode
Keywords:
Status: CLOSED DUPLICATE of bug 1401420
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: pre-dev-freeze
: ---
Assignee: Chris Snyder
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-20 06:56 UTC by Liushihui
Modified: 2019-10-28 07:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-22 17:16:55 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Liushihui 2017-01-20 06:56:49 UTC
Description of problem:
When virt-who work at xen mode, configure hypervisor_id=hostname/hwuuid can't work, virt-who hasn't send hostname and hwuuid but send uuid to satellite.

Version-Release number of selected component (if applicable):
virt-who-0.17-10.el7sat.noarch
subscription-manager-1.17.15-1.el7.x86_64
python-rhsm-1.17.9-1.el7.x86_64
Satellite6.2.7-sp2.0

How reproducible:
Always

Steps to Reproduce:
1. Configure virt-who run xen mode and send hostname to satellite.
[root@hp-z220-08 virt-who.d]# cat /etc/virt-who.d/virt 
[test-xen]
type=xen
server=10.73.5.237
username=root
password=red2017
owner=org1
env=Library
rhsm_username=admin
rhsm_password=admin
hypervisor_id=hostname/hwuuid

2. Check xen host's hostname
[root@master ~]# hostname
master

3. Restart virt-who and check virt-who's log.
[root@hp-z220-08 virt-who.d]# service virt-who restart && tail -f /var/log/rhsm/rhsm.log
2017-01-20 01:52:07,819 [virtwho.test-xen DEBUG] Xen-1(27684):MainThread @virt.py:run:364 - Virt backend 'test-xen' started
2017-01-20 01:52:07,819 [virtwho.test-xen DEBUG] Xen-1(27684):MainThread @xen.py:_prepare:42 - Logging into XEN pools https://10.73.5.237
2017-01-20 01:52:07,893 [virtwho.test-xen DEBUG] Xen-1(27684):MainThread @xen.py:login:52 - XEN pool login successful with user root
2017-01-20 01:52:08,381 [virtwho.test-xen DEBUG] Xen-1(27684):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 7a20400e-06ed-4b90-93e8-5f8a2f415ac9 is ignored
2017-01-20 01:52:08,442 [virtwho.test-xen DEBUG] Xen-1(27684):MainThread @xen.py:getHostGuestMapping:80 - Control Domain b8b4312d-d70a-4709-8c7a-5500e746432f is ignored
2017-01-20 01:52:08,442 [virtwho.test-xen DEBUG] Xen-1(27684):MainThread @virt.py:enqueue:357 - Report for config "test-xen" gathered, putting to queue for sending
2017-01-20 01:52:08,454 [virtwho.main DEBUG] MainProcess(27676):MainThread @subscriptionmanager.py:_connect:119 - Authenticating with RHSM username admin
2017-01-20 01:52:11,343 [virtwho.main DEBUG] MainProcess(27676):MainThread @subscriptionmanager.py:hypervisorCheckIn:171 - Checking if server has capability 'hypervisor_async'
2017-01-20 01:52:13,311 [virtwho.main DEBUG] MainProcess(27676):MainThread @subscriptionmanager.py:hypervisorCheckIn:183 - Server does not have 'hypervisors_async' capability
2017-01-20 01:52:13,311 [virtwho.main INFO] MainProcess(27676):MainThread @subscriptionmanager.py:hypervisorCheckIn:194 - Sending update in hosts-to-guests mapping for config "test-xen": 2 hypervisors and 2 guests found
2017-01-20 01:52:13,311 [virtwho.main DEBUG] MainProcess(27676):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: {
    "a8eb67c5-4a34-4596-995f-4a2fac7bf626": [   =======>It should show hostname
        {
            "guestId": "267cea79-3d51-2569-fb40-05b60466009a", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "xen"
            }
        }, 
        {
            "guestId": "c8351dab-dae9-4e48-137a-8eb5f2998758", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "xen"
            }
        }
    ], 
    "7f35e72b-d43b-45b7-b562-152e751b5262": [] =======>It should show hostname
}
2017-01-20 01:52:15,580 [virtwho.main DEBUG] MainProcess(27676):MainThread @executor.py:send_report:101 - Report for config "test-xen" sent


Actual results:
Virt-who still send uuid other than hostname to satellite although it has configured hypervisor_id=hostname

Expected results:
hypervisor_id should take effect. 
1. when set hypervisor_id=hostname, virt-who should send hostname to server
2. when set hypervisor_id=hwuuid, virt-who should send hwuuid to server

Additional info:
It hasn't this problem when virt-who run at esx/rhevm mode.

Comment 4 Chris Snyder 2017-05-12 19:15:11 UTC
Has this feature ever worked with xen mode?

If not I think we should classify this bug as an RFE (as it would be net new functionality).

Comment 6 Chris Snyder 2017-06-07 20:12:41 UTC
After investigation it appears current virt-who is able to differentiate between the different hypervisor_id settings when run in xen mode.

Yuefliu,

When I used the reproduction system provided in Bug 1401420, I see that both the xenmaster and xenhost systems appear to have the same hwuuid.

As this behaviour is not a regression I will move the bug to 7.5.

Comment 7 Jiri Hnidek 2017-06-19 13:02:57 UTC
This bug is probably duplicate of: https://bugzilla.redhat.com/show_bug.cgi?id=1401420. Chris, can you confirm this?

Comment 8 Jiri Hnidek 2017-06-22 17:16:55 UTC

*** This bug has been marked as a duplicate of bug 1401420 ***

Comment 9 Chris Snyder 2017-06-22 17:17:03 UTC
Jiri,

I believe this can be marked as duplicate of bug 1401420.

Closing.


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