yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #37354
[Bug 1407893] Re: nova-network does not use interface for floating ip-SNAT-rule
This is still an issue... has anyone looked at this?
Here is my patch (which seems to be working). It also has the effect of
allowing me to allocate floating IPs to different public networks (which
was my objective).
** No longer affects: centos
** Patch added: "floating_ips.py.patch"
https://bugs.launchpad.net/nova/+bug/1407893/+attachment/4453496/+files/floating_ips.py.patch
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1407893
Title:
nova-network does not use interface for floating ip-SNAT-rule
Status in OpenStack Compute (nova):
Expired
Bug description:
I created a pool of floating IPs with
nova-manage floating create --ip_range=10.10.251.8/29 --pool testnetz
--interface vlan251
But nova-network does use the default public_interface when creating
the SNAT-Rule:
Chain nova-network-float-snat (1 references)
pkts bytes target prot opt in out source destination
0 0 SNAT all -- * * 192.168.90.3 192.168.90.3 to:10.10.251.10
2 168 SNAT all -- * eth0 192.168.90.3 0.0.0.0/0 to:10.10.251.10
instead of using the given one.
Applying this patch
-----------------------
*** nova/network/floating_ips.py.orig Tue Jan 6 10:06:19 2015
--- nova/network/floating_ips.py Tue Jan 6 10:06:43 2015
***************
*** 90,96 ****
msg = _('Fixed ip %s not found') % floating_ip.fixed_ip_id
LOG.debug(msg)
continue
! interface = CONF.public_interface or floating_ip.interface
try:
self.l3driver.add_floating_ip(floating_ip.address,
fixed_ip.address,
--- 90,96 ----
msg = _('Fixed ip %s not found') % floating_ip.fixed_ip_id
LOG.debug(msg)
continue
! interface = floating_ip.interface or CONF.public_interface
try:
self.l3driver.add_floating_ip(floating_ip.address,
fixed_ip.address,
***************
*** 354,360 ****
def _associate_floating_ip(self, context, floating_address, fixed_address,
interface, instance_uuid):
"""Performs db and driver calls to associate floating ip & fixed ip."""
! interface = CONF.public_interface or interface
@utils.synchronized(unicode(floating_address))
def do_associate():
--- 354,360 ----
def _associate_floating_ip(self, context, floating_address, fixed_address,
interface, instance_uuid):
"""Performs db and driver calls to associate floating ip & fixed ip."""
! interface = interface or CONF.public_interface
@utils.synchronized(unicode(floating_address))
def do_associate():
***************
*** 602,608 ****
floating_ip.host = dest
floating_ip.save()
! interface = CONF.public_interface or floating_ip.interface
fixed_ip = floating_ip.fixed_ip
self.l3driver.add_floating_ip(floating_ip.address,
fixed_ip.address,
--- 602,608 ----
floating_ip.host = dest
floating_ip.save()
! interface = floating_ip.interface or CONF.public_interface
fixed_ip = floating_ip.fixed_ip
self.l3driver.add_floating_ip(floating_ip.address,
fixed_ip.address,
------------
changes this to the expectet behavior: Use default only if none is
give on creation of the floating ip pool.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1407893/+subscriptions
References