Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1409984

Summary: Failed to get mapping info from vcenter6.5 when there isn't host on it
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: jsefler, khowell, redakkan, wpoteat, yuefliu
Target Milestone: pre-dev-freezeKeywords: Reopened, Triaged
Target Release: 7.8   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.21.2-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:22:11 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:
Embargoed:

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
#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