Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1409984 - Failed to get mapping info from vcenter6.5 when there isn't host on it
Summary: Failed to get mapping info from vcenter6.5 when there isn't host on it
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: pre-dev-freeze
: 7.8
Assignee: William Poteat
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-04 05:21 UTC by Liushihui
Modified: 2020-09-29 19:22 UTC (History)
5 users (show)

Fixed In Version: virt-who-0.21.2-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:22:11 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github virt-who virt-who pull 71 0 'None' closed 1409984: Retry initial report retrieval on connection timeout 2020-07-13 03:21:40 UTC
Red Hat Product Errata RHBA-2020:3865 0 None None None 2020-09-29 19:22:35 UTC

Description Liushihui 2017-01-04 05:21:42 UTC
Description of problem:
If vcenter6.5 hasn't added any host on it, virt-who will failed to get data from vcenter as "ReadTimeout: HTTPSConnectionPool(host='10.73.3.161', port=443): Read timed out. (read timeout=60)"

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

How reproducible:
Always

Steps to Reproduce:
1. Make sure there is no host on vcenter6.5

2. Register system to satellite6.2.6 and configure virt-who run at esx mode
[root@hp-z220-13 virt-who.d]# subscription-manager  register --username=admin --password=admin
Registering to: ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com:443/rhsm
The system has been registered with ID: d018c125-f6b0-4cda-a2d2-7ab491a052f8 
[root@hp-z220-13 virt-who.d]# cat /etc/virt-who.d/virt 
[test-esx1]
type=esx
server=10.73.3.161
username=Administrator@vsphere.local
#encrypted_password=07928b0a0b0caa7c6e3b5915466210bd
password=Welcome1!
owner=ACME_Corporation
env=Library

3. Restart virt-who service and check virt-who's log
[root@hp-z220-13 virt-who.d]# service virt-who restart && tail -f /var/log/rhsm/rhsm.log
Stopping virt-who:                                         [  OK  ]
Starting virt-who:                                         [  OK  ]
2017-01-04 00:06:05,961 [virtwho.main DEBUG] MainProcess(6085):MainThread @executor.py:terminate:308 - virt-who is shutting down
2017-01-04 00:06:07,008 [virtwho.test-esx1 DEBUG] Esx-3(6254):MainThread @virt.py:run:388 - Virt backend 'test-esx1' terminated
2017-01-04 00:06:07,012 [virtwho.main DEBUG] MainProcess(6085):MainThread @__main__.py:main:23 - virt-who terminated
2017-01-04 00:06:08,239 [virtwho.init DEBUG] MainProcess(6291):MainThread @executor.py:__init__:66 - Using config named 'test-esx1'
2017-01-04 00:06:08,239 [virtwho.init INFO] MainProcess(6291):MainThread @main.py:main:165 - Using configuration "test-esx1" ("esx" mode)
2017-01-04 00:06:08,239 [virtwho.init INFO] MainProcess(6291):MainThread @main.py:main:167 - Using reporter_id='hp-z220-13.qe.lab.eng.nay.redhat.com'
2017-01-04 00:06:08,253 [virtwho.main DEBUG] MainProcess(6297):MainThread @executor.py:run:176 - Starting infinite loop with 60 seconds interval
2017-01-04 00:06:08,288 [virtwho.test-esx1 DEBUG] Esx-1(6301):MainThread @virt.py:run:363 - Virt backend 'test-esx1' started
2017-01-04 00:06:08,290 [virtwho.test-esx1 DEBUG] Esx-1(6301):MainThread @esx.py:_prepare:128 - Log into ESX
2017-01-04 00:06:08,513 [virtwho.test-esx1 DEBUG] Esx-1(6301):MainThread @esx.py:_prepare:131 - Creating ESX event filter
2017-01-04 00:07:08,613 [virtwho.test-esx1 ERROR] Esx-1(6301):MainThread @virt.py:run:378 - Virt backend 'test-esx1' fails with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/virtwho/virt/virt.py", line 371, in run
    self._run()
  File "/usr/lib/python2.6/site-packages/virtwho/virt/esx/esx.py", line 175, in _run
    options=options)
  File "/usr/lib/python2.6/site-packages/suds/client.py", line 542, in __call__
    return client.invoke(args, kwargs)
  File "/usr/lib/python2.6/site-packages/suds/client.py", line 602, in invoke
    result = self.send(soapenv)
  File "/usr/lib/python2.6/site-packages/suds/client.py", line 643, in send
    reply = transport.send(request)
  File "/usr/lib/python2.6/site-packages/virtwho/virt/esx/esx.py", line 96, in send
    verify=False
  File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 507, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 464, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/adapters.py", line 433, in send
    raise ReadTimeout(e, request=request)
ReadTimeout: HTTPSConnectionPool(host='10.73.3.161', port=443): Read timed out. (read timeout=60)
2017-01-04 00:07:08,615 [virtwho.test-esx1 INFO] Esx-1(6301):MainThread @virt.py:run:391 - Waiting 60 seconds before retrying backend 'test-esx1'


Actual results:
It will show "ReadTimeout" error when virt-who try to get mapping info from vcenter6.5.

Expected results:
Virt-who should get mapping info from vcenter and then send it to satellite successfully

Additional info:
After add host to vcenter, virt-who can get mapping info to satellite successfully.

Comment 6 Chris Snyder 2017-05-12 16:10:18 UTC
I cannot reproduce this issue with the configuration given in comment 0.

Can I please have the configuration used to reproduce this (the one that connects to an ESX instance with no hosts)?


Thanks,
Chris

(Removing the Triaged keyword as this bug cannot be worked on until the requested info is provided)

Comment 8 Jan Kurik 2017-12-06 10:31:28 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/

Comment 12 Chris Snyder 2019-04-12 14:43:30 UTC
@dev From this point, we'd like to investigate whether there is another way to query vcenter to get the number of hosts available prior to making the query for the entire list (which seems to timeout when it is empty).
If there is such a way, we should modify virt-who to do this. If not, we should close this bug as cantfix as the fix then requires a change in vcenter.

Comment 14 Rehana 2020-04-13 15:38:46 UTC
Please check if this is been already fixed or not.

Comment 23 errata-xmlrpc 2020-09-29 19:22:11 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 (virt-who bug fix update), 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-2020:3865


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