diff options
Diffstat (limited to 'openstack/common/wsgi.py')
-rw-r--r-- | openstack/common/wsgi.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/openstack/common/wsgi.py b/openstack/common/wsgi.py index 550ea4d..f97d24e 100644 --- a/openstack/common/wsgi.py +++ b/openstack/common/wsgi.py @@ -81,15 +81,23 @@ class Service(service.Service): super(Service, self).__init__(threads) def _get_socket(self, host, port, backlog): - - bind_addr = (host, port) + # TODO(dims): eventlet's green dns/socket module does not actually + # support IPv6 in getaddrinfo(). We need to get around this in the + # future or monitor upstream for a fix + info = socket.getaddrinfo(host, + port, + socket.AF_UNSPEC, + socket.SOCK_STREAM)[0] + family = info[0] + bind_addr = info[-1] sock = None retry_until = time.time() + 30 while not sock and time.time() < retry_until: try: sock = eventlet.listen(bind_addr, - backlog=backlog) + backlog=backlog, + family=family) if sslutils.is_enabled(): sock = sslutils.wrap(sock) |