Bug 1612971
| Summary: | Metadata service takes a long time to response | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Daniel Alvarez Sanchez <dalvarez> |
| Component: | python-eventlet | Assignee: | Jon Schlueter <jschluet> |
| Status: | CLOSED ERRATA | QA Contact: | Eran Kuris <ekuris> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 13.0 (Queens) | CC: | amoralej, amuller, apevec, chrisw, dalvarez, ekuris, ihrachys, joflynn, jschluet, knoha, lhh, mkolesni, nyechiel, oblaut, srevivo, trozet |
| Target Milestone: | z2 | Keywords: | Reopened, Triaged, ZStream |
| Target Release: | 13.0 (Queens) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-eventlet-0.20.1-5.1.el7ost | Doc Type: | Bug Fix |
| Doc Text: |
Due to a bug in eventlet, systems that did not configure any nameservers (or unreachable) and relied only on hosts file for name resolution hit a delay when booting instances. This is because of an attempt at resolving the IPv6 entry if only an IPv4 host was specified.
With this fix, eventlet returns immediately without attempting to use network resolution if at least one of the entries is present in the hosts file.
|
Story Points: | --- |
| Clone Of: | 1504279 | Environment: | |
| Last Closed: | 2018-08-29 16:33:58 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: | |||
| Bug Depends On: | 1504279, 1628772 | ||
| Bug Blocks: | |||
|
Comment 1
Alfredo Moralejo
2018-08-08 08:51:01 UTC
This bug is marked for inclusion in the errata but does not currently contain draft documentation text. To ensure the timely release of this advisory please provide draft documentation text for this bug as soon as possible. If you do not think this bug requires errata documentation, set the requires_doc_text flag to "-". To add draft documentation text: * Select the documentation type from the "Doc Type" drop down field. * A template will be provided in the "Doc Text" field based on the "Doc Type" value selected. Enter draft text in the "Doc Text" field. Fix verified: OSP13 puddle 2018-08-16.1 rpm -qa | grep python-eventlet python-eventlet-0.20.1-5.1.el7ost.noarch I curl the metadata I got it immediately, no delay. Hi Eran,
Curl is not using eventlet so we're not exercising the fix in this bug.
The right way to do it is either through metadata service or through a python script importing eventlet and monkey patching. I attached a reproducer earlier:
--- Additional comment from Daniel Alvarez Sanchez on 2018-08-01 12:04:02 EDT ---
Here is a reproducer:
import eventlet
eventlet.monkey_patch()
import socket
print socket.getaddrinfo('overcloud.internalapi.localdomain', 80, 0, socket.SOCK_STREAM)
For actually verifying this bug you need to add overcloud.internalapi.localdomain to /etc/hosts and remove all nameservers from /etc/resolv.conf. Timing the above script without the fix used to take over 30 seconds. If the fix is applied it should be way faster (1-2 seconds).
Let me know if you need any help.
Thanks,
Daniel
Thanks Eran for giving me access to your setup.
Metadata agent container:
()[root@controller-0 /]# rpm -qa | grep eventlet
python-eventlet-0.20.1-5.1.el7ost.noarch
Empty resolv.conf:
()[root@controller-0 /]# cat /etc/resolv.conf
# Generated by NetworkManager
()[root@controller-0 /]# cat test.py
import eventlet
eventlet.monkey_patch()
import socket
print socket.getaddrinfo('overcloud.internalapi.localdomain', 80, 0, socket.SOCK_STREAM)
()[root@controller-0 /]# time python test.py
[(2, 1, 6, '', ('172.21.33.14', 80))]
real 0m0.166s
user 0m0.126s
sys 0m0.040s
We can leave this as VERIFIED
After checked again with Daniel script it looks like the fix is working
thanks for help Daniel.
()[root@controller-0 /]# time python test.py │············
[(2, 1, 6, '', ('172.21.33.14', 80))] │············
│············
real 0m0.166s │············
user 0m0.126s │············
sys 0m0.040s
()[root@controller-0 /]# cat /etc/resolv.conf │············
# Generated by NetworkManager │············
()[root@controller-0 /]# # empty resolv.conf, and python script using eventlet worked fine
()[root@controller-0 /]# rpm -qa | grep eventlet │············
python-eventlet-0.20.1-5.1.el7ost.noarch
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://access.redhat.com/errata/RHBA-2018:2573 |