yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #65130
[Bug 1698596] Re: Segments plugin with ML2 core plugin not storing in the DB the segmentation_id attribute when creating a segment
Reviewed: https://review.openstack.org/475151
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=323c29fd054913493325ad0e987007181fb48976
Submitter: Jenkins
Branch: master
commit 323c29fd054913493325ad0e987007181fb48976
Author: Miguel Lavalle <malavall@xxxxxxxxxx>
Date: Sat Jun 17 19:49:32 2017 -0500
Store segmentation_id during segment create
The segmentation_id of a new segment is assigned by the
_handle_segment_change callback in the ML2 plugin, which is executed
after the segment was created, before commiting it to the DB. This
patchset adds code to update the newly created segment with the
segmentation_id assigned by the callback.
Change-Id: I493278a0bf5a3a0aadad10e5bee546d83b949fdc
Closes-Bug: #1698596
** 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/1698596
Title:
Segments plugin with ML2 core plugin not storing in the DB the
segmentation_id attribute when creating a segment
Status in neutron:
Fix Released
Bug description:
With ML2 as the core plugin, the segmentation_id of a newly created
segment is assigned by a type manager that is executed by a callback
subscribed to this PRECOMMIT_CREATE notification:
https://github.com/openstack/neutron/blob/master/neutron/services/segments/db.py#L114.
Since the new_segment.create() OVO call is one line above the
notification, the segmentation_id attribute doesn't get stored in the
DB.
This can have various undesired results. As an example, with segment
type VLAN and under Python 2.7, such a segment might never be released
when not used anymore. This is because the VLAN type code will
determine here
https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/type_vlan.py#L221
that the is outside the configured tenant vlan ranges and the
corresponding DB row will never be updated as not allocated. This same
example under Python 3.5 generates the following exception in the
Neutron server: http://paste.openstack.org/show/612964/
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1698596/+subscriptions
References