Red Hat Bugzilla – Bug 860333
nova causing translating src address to 127.0.0.1
Last modified: 2014-06-18 03:00:03 EDT
Description of problem:
I couldn't ping 188.8.131.52 after rebooting machine with nova installed as described in https://fedoraproject.org/wiki/Test_Day:2012-09-18_OpenStack.
[root@jh-testday images]# ping 184.108.40.206
PING 220.127.116.11 (18.104.22.168) 56(84) bytes of data.
--- 22.214.171.124 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1000ms
[root@jh-testday ~]# tcpdump -i eth0 icmp -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:04:35.351881 IP 127.0.0.1 > 126.96.36.199: ICMP echo request, id 2215, seq 14, length 64
15:04:36.351892 IP 127.0.0.1 > 188.8.131.52: ICMP echo request, id 2215, seq 15, length 64
15:04:37.351847 IP 127.0.0.1 > 184.108.40.206: ICMP echo request, id 2215, seq 16, length 64
I found that it is caused by _get_my_ip() in /usr/lib/python2.7/site-packages/nova/flags.py. I changed it to
csock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
(addr, port) = csock.getsockname()
Then, after reboot I got
[root@(none) ~]# systemctl status openstack-nova-network.service
openstack-nova-network.service - OpenStack Nova Network Server
Loaded: loaded (/usr/lib/systemd/system/openstack-nova-network.service; enabled)
Active: failed (Result: exit-code) since Tue, 25 Sep 2012 15:33:34 +0200; 8min ago
Process: 555 ExecStart=/usr/bin/nova-network --config-file /etc/nova/nova.conf --logfile /var/log/nova/network.log (code=exited, status=1/FAILURE)
Sep 25 15:33:39 Linux nova-network: from nova import flags
Sep 25 15:33:39 Linux nova-network: File "/usr/lib/python2.7/site-packages/nova/flags.py", line 118, in <module>
Sep 25 15:33:39 Linux nova-network: default=_get_my_ip(),
Sep 25 15:33:40 Linux nova-network: File "/usr/lib/python2.7/site-packages/nova/flags.py", line 67, in _get_my_ip
Sep 25 15:33:40 Linux nova-network: csock.connect(('220.127.116.11', 80))
Sep 25 15:33:40 Linux nova-network: File "/usr/lib/python2.7/site-packages/eventlet/greenio.py", line 167, in connect
Sep 25 15:33:40 Linux nova-network: while not socket_connect(fd, address):
Sep 25 15:33:40 Linux nova-network: File "/usr/lib/python2.7/site-packages/eventlet/greenio.py", line 37, in socket_connect
Sep 25 15:33:40 Linux nova-network: raise socket.error(err, errno.errorcode[err])
Sep 25 15:33:40 Linux nova-network: socket.error: [Errno 101] ENETUNREACH
After restarting the service, it then worked fine, as well as ping did. So I guess there are some race conditions with other init scripts.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Translating src addr of packet to 127.0.0.1
No translation of output packet.
1) I don't like that it is discovering the listening address this way, not talking about that it is actually rewriting the src of outgoing packet. That's nasty.
2) I'm not sure it is by design, but there is supposed to be DNS on 18.104.22.168, but it tries to connect with datagram socket to port 80.
Note I didn't use quantum
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '18'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 18's end of life.
Thank you for reporting this issue and we are sorry that we may not be
able to fix it before Fedora 18 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior to Fedora 18's end of life.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.