← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1695740] [NEW] Segments, routed-networks, IPAM only usecase regression

 

Public bug reported:

Segments, routed-networks, IPAM only usecase regression

Code[1] will defer IP allocation if host is not specified.

Issues:
 a) This breaks the use case where Neutron is used for IPAM only with
    routed network.
 b) A user can no longer create a port and specify a fixed IP, then later
    bind the port without loosing the fixed-ip information.

 Issue b) above is a very common pattern in Heat templates.
 It is used in Heat templates examples, ref:
   - https://github.com/openstack/heat-templates/blob/master/hot/servers_in_new_neutron_net.yaml#L77:L82
   - https://github.com/openstack/heat-templates/blob/master/hot/servers_in_existing_neutron_net.yaml#L30:L46

Current behaviour with segments is that ip-allocation is deferred for _any_ port create. Deferring ip allocation if the host is not known does make sense. Before host is known the available segments are also not known and we need to wait until the scheduler has picked a host and nova adds binding:host_id. However...
... this does not make sense if the subnet or fixed-ip is specified in the port create request. In this case we should not defer allocation, the user specified exactly what they want and it is known where to allocate the IP.

When / If this port is later bound to a host, an error will be raised if
that host does not have the correct segments. This is essentially the
same update scenario already covered in the code?[2]

When creating an instance using an existing port with and IP address,
the scheduler should take the ip-allocation data from the port provided
in the request and ensure that the instance is scheduled to a host that
is connected to the correct segment. According to nova neutron-routed-
networks spec[1] this exact use case was included.

    """ Use case 2:
         User has a port that has an IP address and thus is effectively
         attached to a segment (but not bound to a host). He/She
         provides it to nova boot. Nova will ask Neutron for the segment
         to which the port is bound by getting the details of the port.
         Given that segment, the scheduler should place the instance
         on a compute host belonging to the corresponding aggregate. """

[1] https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L662:L700
[2] https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L769:L777
[3] https://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/neutron-routed-networks.html

** Affects: neutron
     Importance: Undecided
         Status: New


** Tags: l3-ipam-dhcp

** Description changed:

  Segments, routed-networks, IPAM only usecase regression
  
  Code[1] will defer IP allocation if host is not specified.
  
- Issues:  
-  a) This breaks the use case where Neutron is used for IPAM only with routed network.
-  b) A user can no longer create a port and specify a fixed IP, then later bind the 
-     port without loosing the fixed-ip information.
+ Issues:
+  a) This breaks the use case where Neutron is used for IPAM only with
+     routed network.
+  b) A user can no longer create a port and specify a fixed IP, then later
+     bind the port without loosing the fixed-ip information.
  
-  Issue b) above is a very common pattern in Heat templates. It is used in Heat templates examples, ref:
-  - https://github.com/openstack/heat-templates/blob/master/hot/servers_in_new_neutron_net.yaml#L77:L82
-  - https://github.com/openstack/heat-templates/blob/master/hot/servers_in_existing_neutron_net.yaml#L30:L46
+  Issue b) above is a very common pattern in Heat templates.
+  It is used in Heat templates examples, ref:
+    - https://github.com/openstack/heat-templates/blob/master/hot/servers_in_new_neutron_net.yaml#L77:L82
+    - https://github.com/openstack/heat-templates/blob/master/hot/servers_in_existing_neutron_net.yaml#L30:L46
  
  Current behaviour with segments is that ip-allocation is deferred for _any_ port create. Deferring ip allocation if the host is not known does make sense. Before host is known the available segments are also not known and we need to wait until the scheduler has picked a host and nova adds binding:host_id. However...
  ... this does not make sense if the subnet or fixed-ip is specified in the port create request. In this case we should not defer allocation, the user specified exactly what they want and it is known where to allocate the IP.
  
  When / If this port is later bound to a host, an error will be raised if
  that host does not have the correct segments. This is essentially the
  same update scenario already covered in the code?[2]
  
  When creating an instance using an existing port with and IP address,
  the scheduler should take the ip-allocation data from the port provided
  in the request and ensure that the instance is scheduled to a host that
  is connected to the correct segment. According to nova neutron-routed-
  networks spec[1] this exact use case was included.
  
-     """ Use case 2:
-          User has a port that has an IP address and thus is effectively
-          attached to a segment (but not bound to a host). He/She
-          provides it to nova boot. Nova will ask Neutron for the segment
-          to which the port is bound by getting the details of the port.
-          Given that segment, the scheduler should place the instance
-          on a compute host belonging to the corresponding aggregate. """
- 
+     """ Use case 2:
+          User has a port that has an IP address and thus is effectively
+          attached to a segment (but not bound to a host). He/She
+          provides it to nova boot. Nova will ask Neutron for the segment
+          to which the port is bound by getting the details of the port.
+          Given that segment, the scheduler should place the instance
+          on a compute host belonging to the corresponding aggregate. """
  
  [1] https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L662:L700
  [2] https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L769:L777
  [3] https://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/neutron-routed-networks.html

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

Title:
  Segments, routed-networks, IPAM only usecase regression

Status in neutron:
  New

Bug description:
  Segments, routed-networks, IPAM only usecase regression

  Code[1] will defer IP allocation if host is not specified.

  Issues:
   a) This breaks the use case where Neutron is used for IPAM only with
      routed network.
   b) A user can no longer create a port and specify a fixed IP, then later
      bind the port without loosing the fixed-ip information.

   Issue b) above is a very common pattern in Heat templates.
   It is used in Heat templates examples, ref:
     - https://github.com/openstack/heat-templates/blob/master/hot/servers_in_new_neutron_net.yaml#L77:L82
     - https://github.com/openstack/heat-templates/blob/master/hot/servers_in_existing_neutron_net.yaml#L30:L46

  Current behaviour with segments is that ip-allocation is deferred for _any_ port create. Deferring ip allocation if the host is not known does make sense. Before host is known the available segments are also not known and we need to wait until the scheduler has picked a host and nova adds binding:host_id. However...
  ... this does not make sense if the subnet or fixed-ip is specified in the port create request. In this case we should not defer allocation, the user specified exactly what they want and it is known where to allocate the IP.

  When / If this port is later bound to a host, an error will be raised
  if that host does not have the correct segments. This is essentially
  the same update scenario already covered in the code?[2]

  When creating an instance using an existing port with and IP address,
  the scheduler should take the ip-allocation data from the port
  provided in the request and ensure that the instance is scheduled to a
  host that is connected to the correct segment. According to nova
  neutron-routed-networks spec[1] this exact use case was included.

      """ Use case 2:
           User has a port that has an IP address and thus is effectively
           attached to a segment (but not bound to a host). He/She
           provides it to nova boot. Nova will ask Neutron for the segment
           to which the port is bound by getting the details of the port.
           Given that segment, the scheduler should place the instance
           on a compute host belonging to the corresponding aggregate. """

  [1] https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L662:L700
  [2] https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L769:L777
  [3] https://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/neutron-routed-networks.html

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


Follow ups