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 1254840 - virt-who filter_host_uuids or exclude_host_uuids can't support single quotes
Summary: virt-who filter_host_uuids or exclude_host_uuids can't support single quotes
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
medium
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: xingge
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-19 02:40 UTC by Eko
Modified: 2016-12-01 00:34 UTC (History)
6 users (show)

Fixed In Version: virt-who-0.14-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 11:57:51 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 Eko 2015-08-19 02:40:23 UTC
Description of problem:
The following two modes can't be supported:
 1). use '' for uuids
 filter_host_uuids='aee4ff00-8c33-11e2-994a-6c3be51d959a' 
 2). there is a space between uuids  ", "
 filter_host_uuids="aee4ff00-8c33-11e2-994a-6c3be51d959a", "b081ac44-e247-2c82-4fea-825c08228288"

Version-Release number of selected component (if applicable):
 - RHEL7.2-20150806.1-Server + ESXi6.0 against stage candlepin
 - 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

How reproducible:
always

Steps to Reproduce:
1. stop virt-who service

2. create config file, use single quotes for 'uuids'
[test-esx]
type=esx
server=10.66.78.89
username=administrator
password=qwer1234P!
owner=7652501
env=7652501
filter_host_uuids='aee4ff00-8c33-11e2-994a-6c3be51d959a' 

3. restart virt-who service and check the rhsm.log
2015-08-19 10:29:35,545 [DEBUG]  @virtwho.py:126 - Using config named 'test-esx'
2015-08-19 10:29:35,545 [INFO]  @virtwho.py:662 - Using configuration "test-esx" ("esx" mode)
2015-08-19 10:29:35,546 [DEBUG]  @virtwho.py:209 - Starting infinite loop with 10 seconds interval
2015-08-19 10:29:35,575 [DEBUG]  @esx.py:55 - Log into ESX
2015-08-19 10:29:35,788 [DEBUG]  @esx.py:58 - Creating ESX event filter
2015-08-19 10:29:35,867 [DEBUG]  @esx.py:142 - Waiting for ESX changes
2015-08-19 10:29:35,870 [DEBUG]  @virt.py:173 - Skipping host 'b081ac44-e247-2c82-4fea-825c08228288' because its uuid is not included

======== aee4ff00-8c33-11e2-994a-6c3be51d959a still be skipped ========
2015-08-19 10:29:35,870 [DEBUG]  @virt.py:173 - Skipping host 'aee4ff00-8c33-11e2-994a-6c3be51d959a' because its uuid is not included
2015-08-19 10:29:35,871 [DEBUG]  @subscriptionmanager.py:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem

4. update the config file, make sure there is a blank space between uuids 
[test-esx]
type=esx
server=10.66.78.89
username=administrator
password=qwer1234P!
owner=7652501
env=7652501
filter_host_uuids="aee4ff00-8c33-11e2-994a-6c3be51d959a", "b081ac44-e247-2c82-4fea-825c08228288"

5. restart virt-who service and check the rhsm.log
2015-08-19 10:34:09,298 [DEBUG]  @virtwho.py:126 - Using config named 'test-esx'
2015-08-19 10:34:09,298 [INFO]  @virtwho.py:662 - Using configuration "test-esx" ("esx" mode)
2015-08-19 10:34:09,298 [DEBUG]  @virtwho.py:209 - Starting infinite loop with 10 seconds interval
2015-08-19 10:34:09,327 [DEBUG]  @esx.py:55 - Log into ESX
2015-08-19 10:34:09,513 [DEBUG]  @esx.py:58 - Creating ESX event filter
2015-08-19 10:34:09,581 [DEBUG]  @esx.py:142 - Waiting for ESX changes

======== b081ac44-e247-2c82-4fea-825c08228288 will be skipped =========
2015-08-19 10:34:09,586 [DEBUG]  @virt.py:173 - Skipping host 'b081ac44-e247-2c82-4fea-825c08228288' because its uuid is not included
2015-08-19 10:34:09,586 [DEBUG]  @subscriptionmanager.py:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2015-08-19 10:34:12,581 [DEBUG]  @subscriptionmanager.py:146 - Checking if server has capability 'hypervisor_async'
2015-08-19 10:34:15,043 [DEBUG]  @subscriptionmanager.py:158 - Server does not have 'hypervisors_async' capability
2015-08-19 10:34:15,043 [INFO]  @subscriptionmanager.py:165 - Sending update in hosts-to-guests mapping: {
    "aee4ff00-8c33-11e2-994a-6c3be51d959a": [
        {
            "guestId": "564d3964-c083-deba-55f9-000279dd82f9", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "esx"
            }
        }
    ]
}
2015-08-19 10:34:19,604 [DEBUG]  @esx.py:142 - Waiting for ESX changes


Actual results:
1). can't be use '' for uuids
2). if there is a blank space between uuids, the uuid behind blank space is invalid.


Expected results:
1). the uuids should be split by ''
2). even there is a blank space between uuids, filter_host_uuids or exclude_host_uuids still can work

Additional info:

Comment 2 Eko 2015-08-19 05:16:28 UTC
not only filter_host_uuids and exclude_host_uuids,
filter_host_parents and exclude_host_parents have the same problem.

Comment 3 Radek Novacek 2015-08-25 17:11:34 UTC
Fixed in virt-who-0.14-5.el7.

Comment 5 Eko 2015-09-08 06:07:29 UTC
verified in virt-who-0.14-7.el7.noarch, this issue can't be duplicated.

Comment 6 errata-xmlrpc 2015-11-19 11:57:51 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.