Bug #4320
closedceph-deploy: getaddrinfo needs further change
0%
Description
when trying to resolve hostname on the same node, getaddrinfo seems to expect the /etc/hosts to contain an explicit entry of the ip address or the localhost entry to be commented.
Case:1
ubuntu@plana12:~$ sudo cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 plana12.front.sepia.ceph.com plana12
ubuntu@plana12:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import socket
socket.getaddrinfo('plana12.front.sepia.ceph.com',None)
[(2, 1, 6, '', ('127.0.1.1', 0)), (2, 2, 17, '', ('127.0.1.1', 0)), (2, 3, 0, '', ('127.0.1.1', 0))]
ubuntu@plana12:~$ sudo cat /etc/hosts
127.0.0.1 localhost
#127.0.1.1 plana12.front.sepia.ceph.com plana12
- The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ubuntu@plana12:~$ sudo vi /etc/hosts
ubuntu@plana12:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import socket
socket.getaddrinfo('plana12.front.sepia.ceph.com',None)
[(2, 1, 6, '', ('10.214.131.28', 0)), (2, 2, 17, '', ('10.214.131.28', 0)), (2, 3, 0, '', ('10.214.131.28', 0))]
In which case, this calls for a change in /etc/hosts entry of all the plana nodes when running ceph-deploy task in teuthology.