Bug 1311632 - Guests are being reported with a guestid of ""
Guests are being reported with a guestid of ""
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Radek Novacek
Eko
:
Depends On:
Blocks: 1317008
  Show dependency treegraph
 
Reported: 2016-02-24 11:06 EST by Chris Snyder
Modified: 2016-11-30 19:36 EST (History)
8 users (show)

See Also:
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 01:08:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Script that will show info about guests found on given vCenter/ESX (13.32 KB, text/plain)
2016-03-22 08:25 EDT, Radek Novacek
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2176921 None None None 2016-02-24 11:22 EST

  None (edit)
Description Chris Snyder 2016-02-24 11:06:09 EST
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 11:54:31 EST
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 12:25:21 EST
Customer updated to virt-who-0.14.9.el7 and there is no change
in the behaviour.
Comment 3 Radek Novacek 2016-02-25 02:05:03 EST
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 11:02:19 EST
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 05:32:41 EST
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 07:10:49 EST
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 08:25 EDT
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 01:58:16 EDT
Stuart, is the issue still valid? Did the customer try attached script?
Comment 15 Stuart Auchterlonie 2016-06-03 05:31:01 EDT
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 07:37:22 EDT
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 10:41:54 EDT
Fixed in virt-who-0.17-3.el7.
Comment 22 Eko 2016-09-21 22:16:14 EDT
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-21 22:22:06 EDT
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 01:08:16 EDT
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

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