forked from openstack-archive/networking-calico
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change default host for etcd connections from localhost to 127.0.0.1
On RHEL7, and with eventlet < 0.17, and if python-dns is installed, it doesn't work for a program that uses eventlet to connect to 'localhost'. This is because: - RHEL7's /etc/hosts file maps 'localhost' to ::1 as well as to 127.0.0.1. - eventlet monkey patches DNS resolution (using python-dns, so that it doesn't block all eventlet threads) but the <0.17 code does this in a way that doesn't support IPv6 addresses. The result is that affected systems see an error like this: 2016-03-01 12:09:49.270 10887 TRACE etcd.client MaxRetryError: HTTPConnectionPool(host='localhost', port=4001): Max retries exceeded with url: /v2/keys/calico/openstack/v1/neutron_election (Caused by ProtocolError('Connection aborted.', gaierror(-9, 'Address family for hostname not supported'))) The RHEL7 Juno repository has eventlet 0.15.2, and current Calico depends on python-etcd 0.4.3, which in turn depends on python-dns. So a Calico install with Juno on RHEL7 is affected by this. Specifically, the Neutron server hits the above error when the Calico mechanism driver connects to etcd. The Calico DHCP agent would also hit a similar error if we used it with a Juno release. Currently the Calico DHCP agent is incompatible with Juno for other reasons; but we plan to address those reasons, so it makes sense to fix this 'localhost' problem in the Calico DHCP agent code too. In both cases, the pragmatic fix is to change 'localhost' to '127.0.0.1', so that name resolution is not needed. Change-Id: Ia96d509f4e2a4d49419557aee3f85b8ab9f2518c Sem-Ver: bugfix
- Loading branch information
Neil Jerram
authored and
Neil Jerram
committed
Mar 2, 2016
1 parent
ec7a01c
commit 6047195
Showing
5 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters