Public bug reported: Before routed network, functions in [1] are used to manage network segment. Routed network introduces a plugin [2] to manage network segment. So, now there are 2 code paths to do the same job.
This cause issue when create network in ml2. When the network is created, related segmentation_id will be reserved in ml2 and related segments will be created by using [1]. In [1], PRECOMMIT_CREATE event for SEGMENT will be sent out. In patch [3], a subscriber was added in ml2 to subscribe the PRECOMMIT_CREATE event of SEGMENT. The subscriber will reserve the segmentation_id. But the segmentation_id has already been reserved. A workaround was added at [4] to avoid issue. Ideally, ml2 should use [2] to create segment and let [2] to do other things(like reserve segmentation_id). This can eliminate the workaround. [1] neutron.db.segments_db [2] neutron.services.segments.plugin [3] f564dcad4d8c072767ae235353a982653b156c76 [4] https://github.com/openstack/neutron/blob/8dffc238759cf543681443a2a4540dd0d569da6a/neutron/plugins/ml2/plugin.py#L1814-L1821 ** Affects: neutron Importance: Undecided Assignee: Hong Hui Xiao (xiaohhui) Status: New ** Changed in: neutron Assignee: (unassigned) => Hong Hui Xiao (xiaohhui) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1621720 Title: Unify the code path of creating segment Status in neutron: New Bug description: Before routed network, functions in [1] are used to manage network segment. Routed network introduces a plugin [2] to manage network segment. So, now there are 2 code paths to do the same job. This cause issue when create network in ml2. When the network is created, related segmentation_id will be reserved in ml2 and related segments will be created by using [1]. In [1], PRECOMMIT_CREATE event for SEGMENT will be sent out. In patch [3], a subscriber was added in ml2 to subscribe the PRECOMMIT_CREATE event of SEGMENT. The subscriber will reserve the segmentation_id. But the segmentation_id has already been reserved. A workaround was added at [4] to avoid issue. Ideally, ml2 should use [2] to create segment and let [2] to do other things(like reserve segmentation_id). This can eliminate the workaround. [1] neutron.db.segments_db [2] neutron.services.segments.plugin [3] f564dcad4d8c072767ae235353a982653b156c76 [4] https://github.com/openstack/neutron/blob/8dffc238759cf543681443a2a4540dd0d569da6a/neutron/plugins/ml2/plugin.py#L1814-L1821 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1621720/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp