Bug 869960 - virt-who cannot work in ESX mode if setting the parameter VIRTWHO_ESX_SERVER without "https://"
virt-who cannot work in ESX mode if setting the parameter VIRTWHO_ESX_SERVER ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity medium
: alpha
: ---
Assigned To: Radek Novacek
Entitlement Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-25 04:56 EDT by lzhuang
Modified: 2016-11-30 19:31 EST (History)
3 users (show)

See Also:
Fixed In Version: virt-who-0.8-5.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 04:50:54 EST
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)

  None (edit)
Description lzhuang 2012-10-25 04:56:08 EDT
Description of problem:
If set the parameter VIRTWHO_ESX_SERVER started with "https://", virt-who can work fine in ESX mode.
But if set this parameter without "https://", virt-who cannot work.


Version-Release number of selected component (if applicable):
virt-who-0.8-4.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Set the ESX parameters in file /etc/sysconfig/virt-who to make virt-who working in ESX mode:
   VIRTWHO_DEBUG=1
   VIRTWHO_ESX=1
   VIRTWHO_ESX_OWNER=ACME_Corporation
   VIRTWHO_ESX_ENV=env1
   VIRTWHO_ESX_SERVER=10.66.xx.xx
   VIRTWHO_ESX_USERNAME=<username>
   VIRTWHO_ESX_PASSWORD=<password>

2. Restart service virt-who
   # service virt-who restart
   Stopping virt-who:                                         [  OK  ]
   Starting virt-who:                                         [  OK  ]

3. check the log file:
   # tail -f /var/log/rhsm/rhsm.log

    2012-10-25 16:41:13,004 [WARNING]  @virt-who.py:462 - Listening for events is not available in VDSM, ESX, RHEV-M or Hyper-V mode
    2012-10-25 16:41:13,047 [DEBUG]  @virt-who.py:475 - Virt-who is running in esx mode
    2012-10-25 16:41:13,048 [DEBUG]  @virt-who.py:482 - Starting infinite loop with 3600 seconds interval and event handling
    2012-10-25 16:41:13,048 [ERROR]  @virt-who.py:170 - Unable to create connection:
    Traceback (most recent call last):
          File "/usr/share/virt-who/virt-who.py", line 167, in _send
        self.checkConnections()
      File "/usr/share/virt-who/virt-who.py", line 146, in checkConnections
        self.initVirt()
      File "/usr/share/virt-who/virt-who.py", line 106, in initVirt
        self.virt = VSphere(self.logger, self.options.server, self.options.username, self.options.password)
      File "/usr/share/virt-who/vsphere.py", line 117, in __init__
        self.client = suds.client.Client("%s/sdk/vimService.wsdl" % url)
      File "/usr/lib/python2.6/site-packages/suds/client.py", line 112, in __init__
        self.wsdl = reader.open(url)
      File "/usr/lib/python2.6/site-packages/suds/reader.py", line 152, in open
        d = self.fn(url, self.options)
      File "/usr/lib/python2.6/site-packages/suds/wsdl.py", line 136, in __init__
        d = reader.open(url)
      File "/usr/lib/python2.6/site-packages/suds/reader.py", line 79, in open
        d = self.download(url)
      File "/usr/lib/python2.6/site-packages/suds/reader.py", line 95, in download
        fp = self.options.transport.open(Request(url))
      File "/usr/lib/python2.6/site-packages/suds/transport/https.py", line 60, in open
        return  HttpTransport.open(self, request)
      File "/usr/lib/python2.6/site-packages/suds/transport/http.py", line 62, in open
        return self.u2open(u2request)
      File "/usr/lib/python2.6/site-packages/suds/transport/http.py", line 118, in u2open
        return url.open(u2request, timeout=tm)
      File "/usr/lib64/python2.6/urllib2.py", line 383, in open
        protocol = req.get_type()
      File "/usr/lib64/python2.6/urllib2.py", line 244, in get_type
        raise ValueError, "unknown url type: %s" % self.__original
    ValueError: unknown url type: 10.66.79.73/sdk/vimService.wsdl
    2012-10-25 16:41:13,050 [ERROR]  @virt-who.py:173 - Unable to recover, retry in 60 seconds.

   ^^^^^ There's error log, and virt-who cannot work


4. Set the parameter VIRTWHO_ESX_SERVER started with "https://":
   VIRTWHO_ESX_SERVER=https://10.66.xx.xx

5. Restart service virt-who
   # service virt-who restart
   Stopping virt-who:                                         [  OK  ]
   Starting virt-who:                                         [  OK  ]

6. Check the log file:
   # tail -f /var/log/rhsm/rhsm.log
    2012-10-25 16:48:35,353 [WARNING]  @virt-who.py:462 - Listening for events is not available in VDSM, ESX, RHEV-M or Hyper-V mode
    2012-10-25 16:48:39,043 [DEBUG]  @virt-who.py:475 - Virt-who is running in esx mode
    2012-10-25 16:48:39,044 [DEBUG]  @virt-who.py:482 - Starting infinite loop with 3600 seconds interval and event handling
    2012-10-25 16:48:39,277 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {}
  

   ^^^^^ no more errors and virt-who starts to sending host/guest associations
  

Actual results:
As list.

Expected results:
virt-who can work whenever "https://" is added to parameter VIRTWHO_ESX_SERVER or not.

Additional info:
Comment 1 Radek Novacek 2012-10-25 05:46:56 EDT
This bug has been fixed in virt-who-0.8-5.el6.
Comment 3 lzhuang 2012-10-26 01:40:35 EDT
Verified version:
# rpm -qa|grep virt-who
virt-who-0.8-5.el6.noarch

Set the parameters:
   VIRTWHO_DEBUG=1
   VIRTWHO_ESX=1
   VIRTWHO_ESX_OWNER=ACME_Corporation
   VIRTWHO_ESX_ENV=env1
   VIRTWHO_ESX_SERVER=10.66.xx.xx
   VIRTWHO_ESX_USERNAME=<username>
   VIRTWHO_ESX_PASSWORD=<password>

Restart service virt-who:
   # service virt-who restart
   Stopping virt-who:                                         [  OK  ]
   Starting virt-who:                                         [  OK  ]

Check the log file:
   # tail -f /var/log/rhsm/rhsm.log
   2012-10-26 13:35:23,170 [WARNING]  @virt-who.py:462 - Listening for events is not available in VDSM, ESX, RHEV-M or Hyper-V mode
   2012-10-26 13:35:28,158 [DEBUG]  @virt-who.py:475 - Virt-who is running in esx mode
   2012-10-26 13:35:28,158 [DEBUG]  @virt-who.py:482 - Starting infinite loop with 1 seconds interval and event handling
   2012-10-26 13:35:29,730 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {44454c4c-4c00-1031-8053-b8c04f4e3258: [4203dd39-bac2-63c9-f845-0f254b882d60, 4203dcaf-a087-ecdb-be90-f81feac76dd4, 421b997f-546c-a663-0bd1-3c383d6800f9], 44454c4c-4200-1034-8039-b8c04f503258: [421b5547-61d2-06a3-5767-e8e971dafe0c, 4203946d-9cca-33f5-95c4-dd6de8ecb8f4, 42035778-9ff7-0b48-be6b-19273d65446a]}

  ^^^^^ virt-who works and start to report uuids.

Moving it to VERIFIED.
Comment 5 errata-xmlrpc 2013-02-21 04:50:54 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0374.html

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