Public bug reported: When a port is bound, it should contain a segment_id column which is the segment that it is bound to. This is necessary for the L2 adjacency case of the Routed Networks spec.
The behavior to use the fixed_ips and look up the subnet that the port is connected to and then grab the segment_id from the subnet appeared in https://review.opendev.org/c/openstack/neutron/+/840418 and then was duplicated in https://review.opendev.org/c/openstack/networking-generic- switch/+/939211 But if L2 adjacency is happening and the subnet spans all the segments then there is no way to determine the segment that the port is bound to. This is important for underlay style networks utilizing VXLAN for example where the VNI will be bound to a local VLAN ID which is captured as a segment as described in https://bugs.launchpad.net/neutron/+bug/2105855 It also affects which segment is passed to the segments to bind as it will attempt to bind all segments https://opendev.org/openstack/neutron/src/commit/9190d8988be1326ea44027fd63660dd4bd28c1ce/neutron/plugins/ml2/drivers/mech_agent.py#L120 This would further be necessary if extensions like https://bugs.launchpad.net/neutron/+bug/1756705 were ever implemented. A few out of tree ML2 mechanisms today handle this by adding a DB column or tracking it in their own table or doing extra call outs.. for example.. https://opendev.org/x/networking- arista/src/commit/6c877821e3b64f34878b4feecd618fd53a151210/networking_arista/ml2/mechanism_arista.py#L330 ** Affects: neutron Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/2114451 Title: ports should contain a reference to the segment_id they are bound to Status in neutron: New Bug description: When a port is bound, it should contain a segment_id column which is the segment that it is bound to. This is necessary for the L2 adjacency case of the Routed Networks spec. The behavior to use the fixed_ips and look up the subnet that the port is connected to and then grab the segment_id from the subnet appeared in https://review.opendev.org/c/openstack/neutron/+/840418 and then was duplicated in https://review.opendev.org/c/openstack/networking- generic-switch/+/939211 But if L2 adjacency is happening and the subnet spans all the segments then there is no way to determine the segment that the port is bound to. This is important for underlay style networks utilizing VXLAN for example where the VNI will be bound to a local VLAN ID which is captured as a segment as described in https://bugs.launchpad.net/neutron/+bug/2105855 It also affects which segment is passed to the segments to bind as it will attempt to bind all segments https://opendev.org/openstack/neutron/src/commit/9190d8988be1326ea44027fd63660dd4bd28c1ce/neutron/plugins/ml2/drivers/mech_agent.py#L120 This would further be necessary if extensions like https://bugs.launchpad.net/neutron/+bug/1756705 were ever implemented. A few out of tree ML2 mechanisms today handle this by adding a DB column or tracking it in their own table or doing extra call outs.. for example.. https://opendev.org/x/networking- arista/src/commit/6c877821e3b64f34878b4feecd618fd53a151210/networking_arista/ml2/mechanism_arista.py#L330 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/2114451/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

