Bug 1416298
| Summary: | Virt-who report wrong guests status for hyper-v when configure guests with same guest name | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Liushihui <shihliu> | ||||||
| Component: | virt-who | Assignee: | William Poteat <wpoteat> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Eko <hsun> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.3 | CC: | bbuckingham, hsun, jcallaha, jhnidek, khowell, sgao, tomckay, toneata, wpoteat, yuefliu | ||||||
| Target Milestone: | alpha | Keywords: | Triaged | ||||||
| Target Release: | 7.7 | ||||||||
| 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: | 2020-03-31 19:08:44 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: |
|
||||||||
Created attachment 1244191 [details]
import_process1
Created attachment 1244192 [details]
import_success
Moving component to upstream virt-who (seems like a general virt-who issue). Why is this a valid test? It is not sustainable to create more than one guest vm with the same guest id. When you make the duplicate, change the system uuid and check the outcome. Can you give me the connection information to the hyperv manager so I can see what state is getting sent? The log also if you can capture it. Workaround: The state of the systems is stored in a hash table by "ElementName". That is the system name "7.6_Server_x86_64". It will only keep the state it gets last and use it for all systems with that name. Rename the systems to be unique. I will examine the collected data to see if there is a field that will always be unique for this purpose. 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://access.redhat.com/errata/RHBA-2020:0990 |
Description of problem: When export a vm then import it to hyperv, virt-who will report wrong guest's status to server. Version-Release number of selected component (if applicable): virt-who-0.17-10.el7sat.noarch Satellite6.2.7-sp3 HYPERV2016 How reproducible: Always Steps to Reproduce: 1. In HyperV machine, create and start a VM(rhel69). 2. Configure virt-who run at hyperv mode to monitor the hyperv machine. [root@bkr-hv03-guest20 virt-who.d]# cat /etc/virt-who.d/hyperv1 [test-hyperv2] type=hyperv server=10.73.5.227 username=virtwho\administrator encrypted_password=3ce98c643e783a83cc247b00ea3d2d3c owner=org1 env=Library rhsm_username=admin rhsm_encrypted_password=ce6d7d014da9d0a7f5590bdd15c376d2 rhsm_prefix=/rhsm rhsm_port=443 rhsm_hostname=hp-ml370g6-01.rhts.eng.bos.redhat.com hypervisor_id=hostname 3. Restar virt-who and check virt-who's log, virt-who can send correct guest's status to satellite 2017-01-25 02:41:56,268 [virtwho.main DEBUG] MainProcess(31205):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: { "virtwho_03": [ { "guestId": "5EF3A910-F00F-7447-A995-2BE57CA30A6F", "state": 1, =======> It's correct to show guest is running "attributes": { "active": 1, =======> It's correct to show guest is running "virtWhoType": "hyperv" } } ] } 2017-01-25 02:41:58,211 [virtwho.main DEBUG] MainProcess(31205):MainThread @executor.py:send_report:101 - Report for config "test-hyperv2" sent 4. In HyperV machine, export the VM(rhel69). 5. In HyperV machine, import the VM(rhel69) which exported on step 4, in the "choose import type" window, choose "copy the virtual machine(create a new unique ID)", see screenshot import_process.jpeg. 6. After import VM successfully, please see screenshot import_succss.jpeg. check virt-who's log [root@bkr-hv03-guest20 virt-who.d]# tail -f /var/log/rhsm/rhsm.log 2017-01-25 02:52:02,500 [virtwho.main DEBUG] MainProcess(31205):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: { "virtwho_03": [ { "guestId": "5EF3A910-F00F-7447-A995-2BE57CA30A6F", "state": 5, ====> It's wrong "attributes": { "active": 0, ====> It's wrong "virtWhoType": "hyperv" } }, { "guestId": "5EF3A910-F00F-7447-A995-2BE57CA30A6F", "state": 5, "attributes": { "active": 0, "virtWhoType": "hyperv" } } ] } 2017-01-25 02:52:05,375 [virtwho.main DEBUG] MainProcess(31205):MainThread @executor.py:send_report:101 - Report for config "test-hyperv2" sent Actual results: Virt-who can get the new imported VM, but the original guest's status is wrong. Expected results: As the original guest is running, it should show the original guest is running and the imported one is stop. "virtwho_03": [ { "guestId": "5EF3A910-F00F-7447-A995-2BE57CA30A6F", "state": 1, ====> It should updated to "1" "attributes": { "active": 1, ====> It should updated to "1" "virtWhoType": "hyperv" } }, { "guestId": "5EF3A910-F00F-7447-A995-2BE57CA30A6F", "state": 5, "attributes": { "active": 0, "virtWhoType": "hyperv" } } ] Additional info: