Bug 1369624

Summary: If create 100 same configure files for esx in /etc/virt-who.d/, some of them will show "ReadTimeout: HTTPSConnectionPool "
Product: Red Hat Enterprise Linux 7 Reporter: Eko <hsun>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED NOTABUG QA Contact: Eko <hsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: ovasik, sgao, shihliu, yuefliu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-07 05:57:13 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:
Attachments:
Description Flags
rhsm.log for 100 configure files none

Description Eko 2016-08-24 02:39:38 UTC
Description of problem:
We try to create 100 same configure files in /etc/virt-who.d for esx mode performance testing, that means virt-who will create 100 PIDs and fetch the hosts/guests info from vcenter, some of the PIDs will show "ReadTimeout: HTTPSConnectionPool(host='10.73.3.183', port=443): Read timed out. (read timeout=60)"


Version-Release number of selected component (if applicable):
virt-who-0.17-7.el7.noarch
subscription-manager-1.17.10-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. create 100 configure files in /etc/virt-who.d for esx mode

2. restart virt-who 

3. check the rhsm.log, will find some configure files failed to fetch host/guests info from vcenter:
2016-08-19 01:00:51,780 [virtwho.test-esx_3 ERROR] Esx-3(16009):MainThread @virt.py:run:379 - Virt backend 'test-esx_3' fails with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 372, in run
    self._run()
  File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 175, in _run
    options=options)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 542, in __call__
    return client.invoke(args, kwargs)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
    result = self.send(soapenv)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 641, in send
    reply = transport.send(request)
  File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 96, in send
    verify=False
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 507, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 464, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 433, in send
    raise ReadTimeout(e, request=request)
ReadTimeout: HTTPSConnectionPool(host='10.73.3.183', port=443): Read timed out. (read timeout=60)

Actual results:
So many virt-who PIDs fetch the host/guests info at the same time, thus, some pids will failed due to ReadTimeout

Expected results:
All the Pids can works normally

Additional info:

Comment 1 Eko 2016-08-24 02:42:35 UTC
Created attachment 1193453 [details]
rhsm.log for 100 configure files

Comment 3 Radek Novacek 2016-08-25 06:37:44 UTC
Given that virt-who connects to the same hypervisor 100 times in parallel, it's quite expected that one hypervisor won't be able to handle all the requests.

Please retry with more than one hypervisor. As I see it now, this is not a bug.

Comment 4 Eko 2016-09-07 05:57:13 UTC
one vcenter can't handle so many virt-who PIDs at the same time, deploy 5 vcenter for testing, no error info found