Bug 1372187

Summary: [RHEVH7-ng-4.0]Virt-who failed to connect rhevm4.0 as "HTTP Error 404"
Product: Red Hat Enterprise Linux 7 Reporter: Marcel Kolaja <mkolaja>
Component: virt-whoAssignee: Chris Snyder <csnyder>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: urgent Docs Contact:
Priority: high    
Version: 7.2CC: ahumbe, cshao, fdeutsch, jherrman, mgoldboi, ovasik, rbarry, sgao, sherold, shihliu, snagar, tlavigne, ycui, yuefliu
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.14-9.el7_2.3 Doc Type: Bug Fix
Doc Text:
Prior to this update, virt-who failed to connect to Red Hat Enterprise Virtualization Manager 4.0, as virt-who did not properly parse the virt-who configuration file. With this update, virt-who reads its configuration as expected, and can successfully connect to Red Hat Enterprise Virtualization Manager 4.0.
Story Points: ---
Clone Of: 1346160 Environment:
Last Closed: 2016-12-20 17:27:52 UTC Type: ---
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: 1346160    
Bug Blocks:    

Description Marcel Kolaja 2016-09-01 06:59:31 UTC
This bug has been copied from bug #1346160 and has been proposed
to be backported to 7.2 z-stream (EUS).

Comment 3 Radek Novacek 2016-09-01 07:40:03 UTC
Devel ack added.

Comment 4 Radek Novacek 2016-09-01 11:25:54 UTC
Fixed in virt-who-0.14-9.el7_2.2.

Comment 6 Eko 2016-09-08 09:04:50 UTC
hi Radek,
rhevm mode works now, but the json info is not right, there is only one guest in the hypervisor, it will show "1 hypervisors and 36 guests found",

# virt-who -c rhevm.conf  -d -o
2016-09-08 05:04:19,655 INFO: Using configuration "test-rhevm" ("rhevm" mode)
2016-09-08 05:04:20,287 DEBUG: Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-09-08 05:04:21,711 DEBUG: Checking if server has capability 'hypervisor_async'
2016-09-08 05:04:23,127 DEBUG: Server does not have 'hypervisors_async' capability
2016-09-08 05:04:23,127 INFO: Sending update in hosts-to-guests mapping: 1 hypervisors and 36 guests found
2016-09-08 05:04:23,127 DEBUG: Host-to-guest mapping: {
    "c9580394-546d-47c2-8e0d-91777ac8ba38": [
        {
            "guestId": "fb58a249-4b37-4ece-a958-043bdbff222e", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "rhevm", 
                "hypervisorType": "qemu"
            }
        }
    ]
}
2016-09-08 05:04:24,908 DEBUG: Association for config test-rhevm gathered
2016-09-08 05:04:24,909 DEBUG: virt-who shut down started

Comment 7 Radek Novacek 2016-09-08 09:13:54 UTC
Eko, it's an invalid fix for bug #1369473. I will do a new build soon.

Comment 8 Radek Novacek 2016-09-08 10:53:40 UTC
The build is done: virt-who-0.14-9.el7_2.3

Comment 9 Eko 2016-09-09 02:13:13 UTC
verified with virt-who-0.14-9.el7_2.3

1. config virt-who with rhevm mode
VIRTWHO_RHEVM=1
VIRTWHO_RHEVM_OWNER=7985933
VIRTWHO_RHEVM_ENV=7985933
VIRTWHO_RHEVM_SERVER=https://bootp-73-3-156.eng.pek2.redhat.com:443/ovirt-engine/
VIRTWHO_RHEVM_USERNAME=admin@internal
VIRTWHO_RHEVM_PASSWORD=admin


2. restart virt-who and check the log message
2016-09-08 22:11:02,713 [INFO]  @virtwho.py:706 - Using configuration "env/cmdline" ("rhevm" mode)
2016-09-08 22:11:05,059 [DEBUG]  @virt.py:343 - Getting the host/guests association took too long, interval waiting is skipped
2016-09-08 22:11:05,062 [DEBUG]  @subscriptionmanager.py:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-09-08 22:11:06,222 [DEBUG]  @subscriptionmanager.py:152 - Checking if server has capability 'hypervisor_async'
2016-09-08 22:11:07,106 [DEBUG]  @virt.py:343 - Getting the host/guests association took too long, interval waiting is skipped
2016-09-08 22:11:07,421 [DEBUG]  @subscriptionmanager.py:164 - Server does not have 'hypervisors_async' capability
2016-09-08 22:11:07,421 [INFO]  @subscriptionmanager.py:173 - Sending update in hosts-to-guests mapping: 2 hypervisors and 1 guests found
2016-09-08 22:11:07,421 [DEBUG]  @subscriptionmanager.py:174 - Host-to-guest mapping: {
    "985dc25a-b286-4f1a-96ab-41c2617eb705": [], 
    "c9580394-546d-47c2-8e0d-91777ac8ba38": [
        {
            "guestId": "fb58a249-4b37-4ece-a958-043bdbff222e", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "rhevm", 
                "hypervisorType": "qemu"
            }
        }
    ]
}

Comment 12 errata-xmlrpc 2016-12-20 17:27:52 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-2964.html