← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1515990] Re: Floating IP association without subnet gateway IP

 

Reviewed:  https://review.openstack.org/451665
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d5556a5e4eae3e638c4006987c7a334056b700f4
Submitter: Jenkins
Branch:    master

commit d5556a5e4eae3e638c4006987c7a334056b700f4
Author: durga.malleswari <durga.varanasi@xxxxxxx>
Date:   Thu Mar 30 11:53:08 2017 +0530

    Floating IP association without subnet gateway IP
    
    Neutron throws an exception when we try to attach the floating ip
    to the instances that are launched in a network whose subnet is
    connected to the external router by an Ip address otherthan its
    gateway-ip. Now the neutron will execute the request with no
    exception/warning.
    
    Closes-Bug: #1515990
    
    Change-Id: If212c36d918ed57400a53f4b5fa1925b3d1fa6fd


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1515990

Title:
  Floating IP association without subnet gateway IP

Status in OpenStack Dashboard (Horizon):
  New
Status in neutron:
  Fix Released

Bug description:
  Hi All!

  There is a limitation in neutron/db/l3_db.py code, that not allows
  associating floatingip on a subnet where the subnet gateway ip in the
  database is not set, but the router has a port and ip on that subnet.
  This limitation excludes usecases where the user do not want to set
  default gateway on the subnet where the floating ip is associated, but
  use special host routes instead.

  A real life use case:
  An instance got two networks, one customer facing provider vlan with public internet address, and one GRE based tenant network for operations and maintenance. The the external network providing floating ips is from the company's intranet (like 10.0.0.0/8). The default gateway obviously should be pointing towards the public interface and special host routes used for private address ranges, for example 10.0.0.0/8 used for the intranet communication. In this usecase the user need to assign floating ips on a network where the default gateway is not set to reach the instance from the company's network.

  Code part causing the problem:

  def _get_router_for_floatingip(self, context, internal_port,internal_subnet_id,external_network_id):
        subnet = self._core_plugin.get_subnet(context, internal_subnet_id)

        if not subnet['gateway_ip']:
             msg = (_('Cannot add floating IP to port on subnet %s '
                              'which has no gateway_ip') % internal_subnet_id)
        raise n_exc.BadRequest(resource='floatingip', msg=msg)

  Simply commenting out the validation on subnet['gateway_ip'] allows
  the user to associate floating ip on networks where no default gateway
  is set, and use without any kind of problem. Of course the virtual
  router still has to have port on that subnet.

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


References