ML2 - Network Context, not possible to see original/current segments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Miro Tomaska |
Bug Description
When ML2 driver receive NetworkContext after adding network segment with:
openstack network segment create \
--network e686a356-
--physical-
--network-type vlan \
--segment 300 provision-net3
In `update_
context.current:
{'id': 'e686a356-
'name': 'routed_
'segments': [
{'provider:
'provider:
'provider:
{'provider:
'provider:
'provider:
{'provider:
'provider:
'provider:
context.original:
{'id': 'e686a356-
'name': 'routed_
'segments': [
{'provider:
'provider:
'provider:
{'provider:
'provider:
'provider:
{'provider:
'provider:
'provi der:segmentatio
Expected results:
context.orignial should not include the new segment on physical_network: 'net3'.
Since both current and original include all segments it is not possible for ML2 plugins to know which VLAN to add on managed devices.
Changed in neutron: | |
assignee: | nobody → Miro Tomaska (mtomaska) |
Hello:
I think this is because we are passing the same object in "NetworkContext .network" and "original_ network. network" [1].
The method "_notify_ mechanism_ driver_ for_segment_ change" argument list should contain the related segment and the event type (deletion or creation). With this information the "NetworkContext" can be populated correctly.
Regards.
[1]https:/ /github. com/openstack/ neutron/ blob/3615cd85a4 cc6aeecf7f066c4 eb21c3cdca71d4c /neutron/ plugins/ ml2/plugin. py#L2484- L2486