openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #07449
RFC nova-network RTNETLINK patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I'm looking for comments on the attached patch.
On the net I found older/different versions of
nova/network/linux_net.py
containing
if err and err != 'RTNETLINK answers: File exists\n':
Maybe such a thing would be suitable here?
Ciao
Bernhard M.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk80D4oACgkQSTYLOx37oWSi7gCgzY38V4K2YCApzHz5M7E7j94a
MzoAn2QkR2H1JpUXsrWkyc97HfvSXeAW
=bCbW
-----END PGP SIGNATURE-----
commit 7aff21edce2d5a2b680d10b7af77deb0af47351a
Author: Bernhard M. Wiedemann <bernhard+gitcommit lsmod.de>
Date: Thu Feb 9 19:10:37 2012 +0100
fix problem with openstack-nova-network restart
on openSUSE, openstack-nova-network restart failed with
sudo ip addr add 169.254.169.254/32 scope link dev lo
RTNETLINK answers: File exists
This is avoided by allowing the return value of 2
Signed-off-by: Bernhard M. Wiedemann <bwiedemann suse de>
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
index 0400fdd..72a93c5 100755
--- a/nova/network/linux_net.py
+++ b/nova/network/linux_net.py
@@ -475,7 +475,7 @@ def ensure_metadata_ip():
"""Sets up local metadata ip."""
_execute('ip', 'addr', 'add', '169.254.169.254/32',
'scope', 'link', 'dev', 'lo',
- run_as_root=True, check_exit_code=[0, 254])
+ run_as_root=True, check_exit_code=[0, 2, 254])
def ensure_vpn_forward(public_ip, port, private_ip):
Follow ups