← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1407893] [NEW] nova-network does not use interface for floating ip-SNAT-rule

 

Public bug reported:

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,
------------

changes this to the expectet behavior: Use default only if none is give
on creation.

** Affects: nova
     Importance: Undecided
         Status: New

** Description changed:

  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
+  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
+                       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,
+                   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
+                       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,
+                   try:
+                       self.l3driver.add_floating_ip(floating_ip.address,
+                                                     fixed_ip.address,
  ------------
  
- changes this to the expectet behavior: Use Default if none is give on
- creation.
+ changes this to the expectet behavior: Use default only if none is give
+ on creation.

-- 
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):
  New

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,
  ------------

  changes this to the expectet behavior: Use default only if none is
  give on creation.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1407893/+subscriptions


Follow ups

References