Bug 1412862

Summary: Virt-who send the define hostname to satellite when it run at rhevm mode
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Chris Snyder <csnyder>
Status: CLOSED DUPLICATE QA Contact: Eko <hsun>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: bbuckingham, bkearney, hsun, jcallaha, khowell, rjerrido, sgao, tomckay, yuefliu
Target Milestone: pre-dev-freezeKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-11 21:13:41 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:
Attachments:
Description Flags
updated_hostname_on_rhevm
none
updated_host_on_sat none

Description Liushihui 2017-01-13 01:08:29 UTC
Description of problem:
When virt-who run at rhevm mode, virt-who will send the host's defined name other than real hostname to satellite

Version-Release number of selected component (if applicable):
Satellite6.2.7
virt-who-0.17-10.el6sat.noarch
rhevm3.6.10.2-0.2.el6

How reproducible:
Always

Steps to Reproduce:
1. Configure virt-who run at rhevm mode and send host's hostname to satellite
[root@hp-z220-13 virt-who.d]# cat /etc/virt-who.d/rhevm 
[test-rhevm1]
type=rhevm
server=https://ibm-hs22-04.lab.bos.redhat.com:443
username=admin@internal
password=redhat
owner=org1
env=Library
rhsm_username=admin
rhsm_password=admin
rhsm_hostname=hp-bl460cg5-01.rhts.eng.bos.redhat.com
rhsm_port=443
rhsm_prefix=/rhsm
rhsm_proxy_hostname=aaaa
hypervisor_id=hostname

2. In rhevm webUI, register two hosts to rhevm, the first one's hostname is hp-z220-05.qe.lab.eng.nay.redhat.com and the other one is hp-z220-13.qe.lab.eng.nay.redhat.com
 [root@hp-z220-05 yum.repos.d]# hostname
hp-z220-05.qe.lab.eng.nay.redhat.com
 [root@hp-z220-13 yum.repos.d]# hostname
hp-z220-13.qe.lab.eng.nay.redhat.com

3. In rhevm webUI, Update the hp-z220-05.qe.lab.eng.nay.redhat.com's name to "test_name", please see screenshot in attachment update_hostname.jpeg

4. Restart virt-who service and check virt-who's log.
 [root@hp-z220-13 yum.repos.d]# service virt-who restart && tail -f /var/log/rhsm/rhsm.log
[root@hp-z220-13 virt-who.d]# service virt-who restart
Stopping virt-who:                                         [  OK  ]
Starting virt-who:                                         [  OK  ]
2017-01-12 19:54:53,093 [virtwho.main DEBUG] MainProcess(9958):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: {
    "hp-z220-13.qe.lab.eng.nay.redhat.com": [
        {
            "guestId": "aa8dc538-61ef-4742-88db-fdbce9a97641", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "rhevm"
            }
        }
    ], 
    "test_name": []   ====> It's the defined name
}


Actual results:
Virt-who send host's defined name to satellite.

Expected results:
Virt-who should send the real hostname to satellite other than defined name. in the example, virt-who should send "hp-z220-05.qe.lab.eng.nay.redhat.com" other than "test_name" to satellite. 

Additional info:

Comment 1 Liushihui 2017-01-13 01:14:57 UTC
Created attachment 1240174 [details]
updated_hostname_on_rhevm

Comment 2 Liushihui 2017-01-13 01:15:24 UTC
Created attachment 1240175 [details]
updated_host_on_sat

Comment 8 Chris Snyder 2017-05-10 20:59:05 UTC
Removing triage keyword so the candlepin team can triage this properly.

Comment 9 Chris Snyder 2017-05-11 21:13:41 UTC

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