When deleting a network, delete the segment RP only when the segment is deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Rodolfo Alonso |
Bug Description
When a network is deleted, those are some of the operations executed (in order):
- First we check the network is not used.
- Then the subnets are deleted.
- The segments are deleted.
- The network is deleted.
For each network, the segment plugin updates the Placement resource provider of the segment. When no subnets are allocated in this segment, the segment RP is deleted.
Having more than one subnet per segment, will lead to an unnecessary Placement API load. When the network is being deleted, instead of updating the segment RP, we can wait until the segment is deleted and then we can delete the RP. This will same some time in the Neutron server call "network delete" and will reduce the load in the Placement server.
As an example, some figures. With a network created, I've created another segment and 10 subnets in this new segment.
Code as is now
Skipping the subnet RP update
Skipping the subnet route update (host_routes_
Now adding the segment RP deletion when the segment is deleted
During a network deletion, we can save time and Placement calls just deleting the segment RP only when the segment is already deleted (AFTER_DELETE event).
description: | updated |
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Fix proposed to branch: stable/ussuri /review. opendev. org/728443
Review: https:/