summaryrefslogtreecommitdiffstats
path: root/nova/db/sqlalchemy/models.py
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2013-01-04 18:31:41 -0800
committerVishvananda Ishaya <vishvananda@gmail.com>2013-01-21 18:28:06 -0800
commit6ee9880cade60d474ad098b80d78cdbf8032a327 (patch)
tree977805e5dcc28fbafbfa7b5f57a1944795191200 /nova/db/sqlalchemy/models.py
parentd15d525c880d7065eaaa07b7efc1c48f48d33009 (diff)
downloadnova-6ee9880cade60d474ad098b80d78cdbf8032a327.tar.gz
nova-6ee9880cade60d474ad098b80d78cdbf8032a327.tar.xz
nova-6ee9880cade60d474ad098b80d78cdbf8032a327.zip
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
Diffstat (limited to 'nova/db/sqlalchemy/models.py')
-rw-r--r--nova/db/sqlalchemy/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py
index 5050cb77e..406863f18 100644
--- a/nova/db/sqlalchemy/models.py
+++ b/nova/db/sqlalchemy/models.py
@@ -717,6 +717,12 @@ class FixedIp(BASE, NovaBase):
leased = Column(Boolean, default=False)
reserved = Column(Boolean, default=False)
host = Column(String(255))
+ network = relationship(Network,
+ backref=backref('fixed_ips'),
+ foreign_keys=network_id,
+ primaryjoin='and_('
+ 'FixedIp.network_id == Network.id,'
+ 'FixedIp.deleted == False)')
class FloatingIp(BASE, NovaBase):