When deleting an stateless subnet port can get allocation on subnet with invalid segment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Harald Jensås |
Bug Description
A provider network with 3 stateless subnet, on different segments.
(NOTE, this output is from a dev environment with WIP fixes for bug/1864333 and bug/1864333)
$ for subnet in $(openstack subnet list --network providernet -f value -c ID); do openstack subnet show $subnet -f yaml -c segment_id -c cidr -c id; done
cidr: deaf:beef:3::/64
id: 954a1b8c-
segment_id: 632b2bab-
cidr: deaf:beef:1::/64
id: ebae0025-
segment_id: d1930254-
cidr: deaf:beef:2::/64
id: ec2a9675-
segment_id: 1586a525-
$ openstack port list --network providernet -f yaml -c "Fixed IP Addresses"
- Fixed IP Addresses:
- ip_address: deaf:beef:
subnet_id: ec2a9675-
- Fixed IP Addresses:
- ip_address: deaf:beef:
subnet_id: c052289a-
- Fixed IP Addresses:
- ip_address: deaf:beef:
subnet_id: ebae0025-
- Fixed IP Addresses: [] <-- Deffered allocation
$ openstack subnet delete subnet3
After deleting subnet3, the port who was on this subnet get's an allocation on subnet_id: ebae0025-
$ openstack port list --network providernet -f yaml -c "Fixed IP Addresses"
- Fixed IP Addresses:
- ip_address: deaf:beef:
subnet_id: ec2a9675-
- Fixed IP Addresses:
- ip_address: deaf:beef:
subnet_id: ebae0025-
- Fixed IP Addresses:
- ip_address: deaf:beef:
subnet_id: ebae0025-
- Fixed IP Addresses: []
I belive the correct behaviour here would be to remove the allocation from the deleted segment and set allocaton 'deferred' on the port. Or raise SubnetInUse exception on subnet delete because there is no other auto-address subnet that can satisfy the in-use port.
tags: | added: neutron-proactive-backport-potential |
Related fix proposed to branch: master /review. opendev. org/710546
Review: https:/