Bug 1404117

Summary: when running virt-who by CLI, it will not check the parameters consistency
Product: Red Hat Enterprise Linux 6 Reporter: Eko <hsun>
Component: virt-whoAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: low Docs Contact:
Priority: low    
Version: 6.9CC: csnyder, jhnidek, jkurik, rbalakri, rjerrido, sgao, wpoteat, yuefliu
Target Milestone: rcKeywords: Triaged
Target Release: 6.10   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1461417 1503270 (view as bug list) Environment:
Last Closed: 2018-06-19 05:21:42 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:
Bug Depends On:    
Bug Blocks: 1461417, 1503270    

Description Eko 2016-12-13 06:21:10 UTC
Description of problem:
running virt-who with "--hyperv" option by CLI, and then set other options to other modes, such as "--esx-owner, --esx-env, --esx-server, --esx-username, --esx-password", virt-who still can work, that means it will not check all the parameters consistency.

Version-Release number of selected component (if applicable):
virt-who-0.18-1.el6.noarch
subscription-manager-1.18.5-1.el6.x86_64
python-rhsm-1.18.5-1.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1. run virt-who with an wrong parameter, such as "--hyperv" with "--esx-owner, --esx-env, --esx-server, --esx-username, --esx-password": 

# virt-who --hyperv --esx-owner=Default_Organization --esx-env=Library --esx-server=10.73.5.208 --esx-username=Administrator --esx-password=Welcome1 -d  -o
2016-12-13 01:14:08,564 [virtwho.init INFO] MainProcess(7100):MainThread @main.py:main:165 - Using configuration "env/cmdline" ("hyperv" mode)
2016-12-13 01:14:08,564 [virtwho.init INFO] MainProcess(7100):MainThread @main.py:main:167 - Using reporter_id='hp-z220-07.qe.lab.eng.nay.redhat.com'
2016-12-13 01:14:08,593 [virtwho.env_cmdline DEBUG] MainProcess(7100):MainThread @hyperv.py:__init__:472 - Hyper-V url: http://10.73.5.208:5985/wsman
2016-12-13 01:14:08,595 [virtwho.env_cmdline DEBUG] HyperV-1(7107):MainThread @virt.py:run:363 - Virt backend 'env/cmdline' started
2016-12-13 01:14:08,609 [virtwho.env_cmdline DEBUG] HyperV-1(7107):MainThread @hyperv.py:retry_ntlm_negotiate:64 - Using NTLM authentication
2016-12-13 01:14:08,613 [virtwho.env_cmdline DEBUG] HyperV-1(7107):MainThread @hyperv.py:retry_ntlm_authenticate:77 - Sending NTLM authentication data
2016-12-13 01:14:08,737 [virtwho.env_cmdline DEBUG] HyperV-1(7107):MainThread @hyperv.py:retry_ntlm_authenticate:100 - NTLM authentication successful
2016-12-13 01:14:08,739 [virtwho.env_cmdline DEBUG] HyperV-1(7107):MainThread @hyperv.py:getHostGuestMapping:521 - Unable to enumerate using root/virtualization namespace, trying root/virtualization/v2 namespace
2016-12-13 01:14:11,670 [virtwho.env_cmdline DEBUG] HyperV-1(7107):MainThread @virt.py:enqueue:356 - Report for config "env/cmdline" gathered, putting to queue for sending
2016-12-13 01:14:11,671 [virtwho.env_cmdline DEBUG] HyperV-1(7107):MainThread @virt.py:run:384 - Virt backend 'env/cmdline' stopped after sending one report
2016-12-13 01:14:11,676 [rhsm.https DEBUG] MainProcess(7100):MainThread @https.py:<module>:59 - Using m2crypto wrappers to provide httplib and ssl
2016-12-13 01:14:11,683 [rhsm.connection INFO] MainProcess(7100):MainThread @connection.py:__init__:758 - Connection built: host=bootp-73-3-220.eng.pek2.redhat.com port=443 handler=/rhsm auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=0
2016-12-13 01:14:11,684 [rhsm.connection DEBUG] MainProcess(7100):MainThread @connection.py:_request:490 - Making request: GET /rhsm/status/
2016-12-13 01:14:11,682 [virtwho.main DEBUG] MainProcess(7100):MainThread @subscriptionmanager.py:_connect:124 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-12-13 01:14:11,857 [rhsm.connection INFO] MainProcess(7100):MainThread @connection.py:_request:525 - Response: status=200, request="GET /rhsm/status/"
2016-12-13 01:14:11,857 [rhsm.connection DEBUG] MainProcess(7100):MainThread @connection.py:_request:490 - Making request: GET /rhsm/status
2016-12-13 01:14:11,857 [virtwho.main DEBUG] MainProcess(7100):MainThread @subscriptionmanager.py:hypervisorCheckIn:172 - Checking if server has capability 'hypervisor_async'
2016-12-13 01:14:12,035 [rhsm.connection INFO] MainProcess(7100):MainThread @connection.py:_request:525 - Response: status=200, request="GET /rhsm/status"
2016-12-13 01:14:12,036 [rhsm.connection DEBUG] MainProcess(7100):MainThread @connection.py:_load_manager_capabilities:803 - Server has the following capabilities: ['cores', 'ram', 'instance_multiplier', 'derived_product', 'cert_v3', 'guest_limit', 'vcpu', 'storage_band']
2016-12-13 01:14:12,037 [rhsm.connection DEBUG] MainProcess(7100):MainThread @connection.py:_request:490 - Making request: POST /rhsm/hypervisors?owner=Default_Organization&env=Library
2016-12-13 01:14:12,036 [virtwho.main DEBUG] MainProcess(7100):MainThread @subscriptionmanager.py:hypervisorCheckIn:184 - Server does not have 'hypervisors_async' capability
2016-12-13 01:14:12,036 [virtwho.main INFO] MainProcess(7100):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Sending update in hosts-to-guests mapping for config "env/cmdline": 1 hypervisors and 1 guests found
2016-12-13 01:14:12,036 [virtwho.main DEBUG] MainProcess(7100):MainThread @subscriptionmanager.py:hypervisorCheckIn:196 - Host-to-guest mapping: {
    "564D1925-0DE4-4E14-8B73-2A2444FB15A3": [
        {
            "guestId": "A9BB7EA8-5CC7-CF46-B5D2-6C8FFE6EE3A6", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "hyperv"
            }
        }
    ]
}
2016-12-13 01:14:13,368 [rhsm.connection INFO] MainProcess(7100):MainThread @connection.py:_request:525 - Response: status=200, request="POST /rhsm/hypervisors?owner=Default_Organization&env=Library"
2016-12-13 01:14:13,368 [virtwho.main DEBUG] MainProcess(7100):MainThread @executor.py:send_report:102 - Report for config "env/cmdline" sent
2016-12-13 01:14:13,369 [virtwho.main DEBUG] MainProcess(7100):MainThread @__main__.py:main:23 - virt-who terminated
2016-12-13 01:14:13,370 [virtwho.main DEBUG] MainProcess(7100):MainThread @executor.py:terminate:308 - virt-who is shutting down


Actual results:
virt-who only check "--hyperv" parameter, ignore to check other parameters are matched or not.

Expected results:
virt-who should check all the parameter consistency

Comment 6 Chris Snyder 2017-06-22 15:55:08 UTC
This has been merged to upstream master. As it is before the rebase, this should be pulled in to the first build for 6.10. Moving to MODIFIED.

Comment 13 errata-xmlrpc 2018-06-19 05:21:42 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://access.redhat.com/errata/RHBA-2018:1915