Bug 1311632

Summary: Guests are being reported with a guestid of ""
Product: Red Hat Enterprise Linux 7 Reporter: Chris Snyder <csnyder>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: hsun, ktordeur, mshimura, ovasik, rnovacek, sauchter, sgao, shihliu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-who-0.17-3.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:08:16 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:
Bug Depends On:    
Bug Blocks: 1317008    
Attachments:
Description Flags
Script that will show info about guests found on given vCenter/ESX none

Description Chris Snyder 2016-02-24 16:06:09 UTC
Description of problem:

A customer, in the linked customer case, is seeing some guests, in the debug logging output of virt-who, being reported with a guestid of "". An excerpt of the debug logging can be seen below:

-------------------------------- 
"39333835-3431-5a43-3332-3135444c4c52": [ .... { "attributes": { "active": 0, "virtWhoType": "esx" }, "guestId": "", "state": 5 }, .... { "attributes": { "active": 0, "virtWhoType": "esx" }, "guestId": "", "state": 5 }, --------------------------------




Version-Release number of selected component (if applicable):
virt-who-0.14-1.el7sat.noarch


Actual results:

Virt-who includes guest records that have a guestid of ""


Expected results:
Virt-who sends only guest records that have guestid.


Additional info:

Please see the attached customer case for more information.

Comment 1 Stuart Auchterlonie 2016-02-24 16:54:31 UTC
Please note the virt-who version is the version shipped with Satellite,
not the version shipped with RHEL-7.2

Have any of the updates from 
virt-who-0.14-1.el7sat -> virt-who-0.14.9.el7

addressed this?

Comment 2 Stuart Auchterlonie 2016-02-24 17:25:21 UTC
Customer updated to virt-who-0.14.9.el7 and there is no change
in the behaviour.

Comment 3 Radek Novacek 2016-02-25 07:05:03 UTC
Can you please tell me what configuration the customer has? It seems that the ESX hypervisor doesn't return UUID for guests. What version of ESX do they have?

As a workaround, I would suggest to try setting `hypervisor_id` option to some other value (see man virt-who-config(5)).

I will add handling to virt-who that will skip guests without UUID with some warning message.

Comment 6 Radek Novacek 2016-03-08 16:02:19 UTC
Can the customer try to set `hypervisor_id` configuration option to other values? Possible values are `uuid` and `hostname`.

Comment 8 Radek Novacek 2016-03-10 10:32:41 UTC
Right, I didn't realize this implication.

It seems that the Linked mode could be the problem here. Can I get full /var/log/rhsm/rhsm.log file with debug mode enabled (VIRTWHO_DEBUG=1 in /etc/sysconfig/virt-who)?

Comment 10 Radek Novacek 2016-03-10 12:10:49 UTC
Thanks for the log file.

Most of the guests have the UUID set up correctly. Only two of them (both are inactive) doesn't have the UUID. Could it be possible that those virtual machines in some kind of undefined state (maybe being initialized or broken)?

I would need to know some details about those two machines so I can reproduce the bug myself. Can the customer somehow match the missing UUIDs to virtual machines?

Chris, do you think virt-who should filter out guests without UUID? Or can you handle it in the candlepin?

Comment 13 Radek Novacek 2016-03-22 12:25:39 UTC
Created attachment 1139028 [details]
Script that will show info about guests found on given vCenter/ESX

Attached script should print information about found guests.

Usage: python esx_scan.py <server> <username> <password>

server, username, and password should be the same as virt-who uses.

It will print something like this:
Hypervisor: 9705df9f-76d4-4343-bf10-229e8692ecee: localhost.
        Guest: 564d0e9b-5515-9bb6-6825-56d83831dda3 name: test                 hostname: None                 state: poweredOff
        Guest: 564debb8-4697-a508-e40a-612b7c77f4bf name: test2                hostname: None                 state: poweredOn

Please post the customer's result here for further investigation.

Comment 14 Radek Novacek 2016-05-31 05:58:16 UTC
Stuart, is the issue still valid? Did the customer try attached script?

Comment 15 Stuart Auchterlonie 2016-06-03 09:31:01 UTC
Radek,

I've chased the customer for the output from the script.
I'll let you know what they come back with.

Leaving NEEDINFO on me


Regards
Stuart

Comment 19 Radek Novacek 2016-06-09 11:37:22 UTC
I've added a check that makes sure that guest has non-empty UUID and prints a debug message if not:

https://github.com/virt-who/virt-who/commit/208b7d5afa8ef12b6b0fabe5e9d5e28b0f638f1d

Comment 20 Radek Novacek 2016-06-23 14:41:54 UTC
Fixed in virt-who-0.17-3.el7.

Comment 22 Eko 2016-09-22 02:16:14 UTC
we can't reproduce this issue in virt-who-0.17-10.el7, and there is no "" guest uuid found, due to the rhel7.3 errata schedule, we verified this issue.
if the customers still suffer this issue with the latest virt-who, please reopen it in rhel next release.

Comment 23 Eko 2016-09-22 02:22:06 UTC
and virt-who-0.17 was provided in sat6.2 tool repo, if the customer deploy the sat6.2 the their env, please update virt-who to 0.17-9.el7sat for trial

Comment 25 errata-xmlrpc 2016-11-04 05:08:16 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