From 35c1cc449da12ed9d8627dac146d722c006ee73b Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Fri, 4 Jan 2013 18:31:41 -0800 Subject: [PATCH] Fix floating ips with external gateway If dnsmasq is configured to use an external gateway, then floating ips on other interfaces do not work properly. This is because outgoing traffic is no longer snatted to the floating ip. This patch fixes it by adding an ebtables rule to force traffic from ips that have a floating ip associated to route instead of bridge. Fixes bug 1096985 Change-Id: I8e4904660d42fe51c44b66686bed9f5d622693bd --- nova/tests/test_db_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py index c70e96cd..e7a4ce51 100644 --- a/nova/tests/test_db_api.py +++ b/nova/tests/test_db_api.py @@ -253,11 +253,11 @@ class DbApiTestCase(test.TestCase): values = {'address': 'fixed'} fixed = db.fixed_ip_create(ctxt, values) res = db.floating_ip_fixed_ip_associate(ctxt, floating, fixed, 'foo') - self.assertEqual(res, fixed) + self.assertEqual(res['address'], fixed) res = db.floating_ip_fixed_ip_associate(ctxt, floating, fixed, 'foo') self.assertEqual(res, None) res = db.floating_ip_disassociate(ctxt, floating) - self.assertEqual(res, fixed) + self.assertEqual(res['address'], fixed) res = db.floating_ip_disassociate(ctxt, floating) self.assertEqual(res, None)