RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1243683 - Suggest to put "guestId" on the first line since it's the key attribute
Summary: Suggest to put "guestId" on the first line since it's the key attribute
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: xingge
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-16 05:55 UTC by Liushihui
Modified: 2016-12-01 00:33 UTC (History)
5 users (show)

Fixed In Version: virt-who-0.14-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 11:56:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2370 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2015-11-19 10:39:27 UTC

Description Liushihui 2015-07-16 05:55:49 UTC
Description of problem:
In the virt-who's log, guest's "attributes" is on the first line now. I recommend to put "guestId" on the first line and "state" on the second line since it can make virt-who log much clearer.

Version-Release number of selected component (if applicable):
virt-who-0.14-1.el7.noarch
subscription-manager-1.15.5-1.el7.x86_64
python-rhsm-1.15.3-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Register system to Satellite server
[root@hp-z220-05 ~]# subscription-manager register --username=admin --password=admin
The system has been registered with ID: 29c68cd4-7a82-45e2-85c6-e08d25e8ef86
2.Restart virt-who and check virt-who's log.
[root@hp-z220-05 ~]# systemctl restart virt-who
[root@hp-z220-05 ~]# tail -f /var/log/rhsm/rhsm.log
2015-07-16 13:08:40,266 [INFO]  @subscriptionmanager.py:146 - Sending update in hosts-to-guests mapping: {
    "564d9e7a-4128-92b6-7284-6335f6b399be": [], 
    "aee4ff00-8c33-11e2-994a-6c3be51d959a": [
        {
            "attributes": {
                "active": 0, 
                "virtWhoType": "esx"
            }, 
            "guestId": "564dab7d-3b72-51a1-eeda-586036106892", 
            "state": 5
        },
        {
            "attributes": {
                "active": 1, 
                "virtWhoType": "esx"
            }, 
            "guestId": "4227d611-0abc-fc5e-7538-07ebd83fa9ba", 
            "state": 1
        }

Actual results:
It's not very clearly since "guestId" and "state" on the last two lines. 

Expected results:
I suggest to put "guestId" on the first line since it's the key attribute.just like following:
    "564d9e7a-4128-92b6-7284-6335f6b399be": [], 
    "aee4ff00-8c33-11e2-994a-6c3be51d959a": [
        {
            "guestId": "564dab7d-3b72-51a1-eeda-586036106892", 
            "state": 5
            "attributes": {
                "active": 0, 
                "virtWhoType": "esx"
            }, 
        },
        {
            "guestId": "4227d611-0abc-fc5e-7538-07ebd83fa9ba", 
            "state": 1
            "attributes": {
                "active": 1, 
                "virtWhoType": "esx"
            }, 
        }

Additional info:

Comment 1 Radek Novacek 2015-07-16 15:41:05 UTC
Fixed in virt-who-0.14-2.el7.

Comment 3 Liushihui 2015-08-11 06:50:08 UTC
Verified it on virt-who-0.14-3.el7.noarch since "guestId" and "state" have been put on the first two lines

Verified version
virt-who-0.14-3.el7.noarch
subscription-manager-1.15.9-2.el7.x86_64
python-rhsm-1.15.4-2.el7.x86_64
Satellite 6.1.0-20150731.0

Verified process:
1. Register system to Satellite server
[root@hp-z220-05 ~]# subscription-manager register --username=admin --password=admin
2.Restart virt-who and check virt-who's log.
[root@hp-z220-05 ~]# systemctl restart virt-who
[root@hp-z220-05 ~]# tail -f /var/log/rhsm/rhsm.log
2015-08-11 14:46:58,462 [DEBUG]  @subscriptionmanager.py:158 - Server does not have 'hypervisors_async' capability
2015-08-11 14:46:58,462 [INFO]  @subscriptionmanager.py:165 - Sending update in hosts-to-guests mapping: {
    "86b2bd00-8bad-11e2-87f4-6c3be514699d": [
        {
            "guestId": "42390187-0ca7-6139-dadb-549a990f34e3", 
            "state": 5, 
            "attributes": {
                "active": 0, 
                "virtWhoType": "esx"
            }
        }, 
        {
            "guestId": "564d1d17-06d9-46c3-beea-fed130d564e7", 
            "state": 5, 
            "attributes": {
                "active": 0, 
                "virtWhoType": "esx"
            }
        }, 
        {
            "guestId": "4239d107-b6b3-ec67-3317-678288dafe5a", 
            "state": 5, 
            "attributes": {
                "active": 0, 
                "virtWhoType": "esx"
            }
        }
    ]
}

Result:
"guestId" and "state" have shown on the first two lines. Therefore, verify it

Comment 4 errata-xmlrpc 2015-11-19 11:56:49 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-2015-2370.html


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