Jump to: navigation, search

Difference between revisions of "Manila/issue-neutron-on-localhost-ipv6"

m
Line 25: Line 25:
 
After some digging, I have found out the source of this error. There is a python-dnspython package installed.  The eventlet package check is dns module (dnspython) present and if present in replace socket's function getaddrinfo. But function getaddrinfo from eventlet packages incorrectly handle ipv6 addresses. In our case it resolve domain "localhost" into ::1 (using /etc/hosts) and we got this error.
 
After some digging, I have found out the source of this error. There is a python-dnspython package installed.  The eventlet package check is dns module (dnspython) present and if present in replace socket's function getaddrinfo. But function getaddrinfo from eventlet packages incorrectly handle ipv6 addresses. In our case it resolve domain "localhost" into ::1 (using /etc/hosts) and we got this error.
  
[[https://bitbucket.org/eventlet/eventlet/issue/105/name-resolution-needs-to-support-ipv6]]
+
[[https://bitbucket.org/eventlet/eventlet/issue/105/name-resolution-needs-to-support-ipv6 eventlet issue]]
  
 
== workaround ==
 
== workaround ==

Revision as of 14:31, 24 July 2014

I got an issue, on fresh devstack installation (ubuntu-server-14.04). Here is symptom:

 2014-07-24 07:26:21.852 INFO urllib3.connectionpool [req-17b5ef32-2198-4d6f-9baf-d24c803010ba None None] Starting new HTTP connection (1): localhost
 2014-07-24 07:26:21.852 DEBUG neutronclient.client [req-17b5ef32-2198-4d6f-9baf-d24c803010ba None None] throwing ConnectionFailed : HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: /v2.0/tokens (Caused by <class 'socket.error'>: [Errno -9] Address family for hostname not supported) from (pid=22246) _cs_request /opt/devel/openstack/python-neutronclient/neutronclient/client.py:112
 2014-07-24 07:26:21.853 DEBUG manila.share.drivers.service_instance [req-17b5ef32-2198-4d6f-9baf-d24c803010ba None None] Connection to neutron failed. from (pid=22246) init /opt/devel/openstack/manila/manila/share/drivers/service_instance.py:145
 2014-07-24 07:26:24.857 ERROR manila.service [req-17b5ef32-2198-4d6f-9baf-d24c803010ba None None] Unhandled exception
 2014-07-24 07:26:24.857 TRACE manila.service Traceback (most recent call last):
 2014-07-24 07:26:24.857 TRACE manila.service   File "/opt/devel/openstack/manila/manila/service.py", line 225, in _start_child
 2014-07-24 07:26:24.857 TRACE manila.service     self._child_process(wrap.server)
 2014-07-24 07:26:24.857 TRACE manila.service   File "/opt/devel/openstack/manila/manila/service.py", line 202, in _child_process
 2014-07-24 07:26:24.857 TRACE manila.service     launcher.run_server(server)
 2014-07-24 07:26:24.857 TRACE manila.service   File "/opt/devel/openstack/manila/manila/service.py", line 93, in run_server
 2014-07-24 07:26:24.857 TRACE manila.service     server.start()
 2014-07-24 07:26:24.857 TRACE manila.service   File "/opt/devel/openstack/manila/manila/service.py", line 374, in start
 2014-07-24 07:26:24.857 TRACE manila.service     self.manager.init_host()
 2014-07-24 07:26:24.857 TRACE manila.service   File "/opt/devel/openstack/manila/manila/share/manager.py", line 76, in init_host
 2014-07-24 07:26:24.857 TRACE manila.service     self.driver.do_setup(ctxt)
 2014-07-24 07:26:24.857 TRACE manila.service   File "/opt/devel/openstack/manila/manila/share/drivers/generic.py", line 143, in do_setup
 2014-07-24 07:26:24.857 TRACE manila.service     driver_config=self.configuration)
 2014-07-24 07:26:24.857 TRACE manila.service   File "/opt/devel/openstack/manila/manila/share/drivers/service_instance.py", line 149, in init
 2014-07-24 07:26:24.857 TRACE manila.service     raise exception.ServiceInstanceException(_('Can not receive '
 2014-07-24 07:26:24.857 TRACE manila.service ServiceInstanceException: Can not receive service tenant id.
 2014-07-24 07:26:24.857 TRACE manila.service

After some digging, I have found out the source of this error. There is a python-dnspython package installed. The eventlet package check is dns module (dnspython) present and if present in replace socket's function getaddrinfo. But function getaddrinfo from eventlet packages incorrectly handle ipv6 addresses. In our case it resolve domain "localhost" into ::1 (using /etc/hosts) and we got this error.

[eventlet issue]

workaround

remove line

 ::1 localhost

from /etc/hosts