Subnet pool attribute updates fail when using address scopes

Bug #2074092 reported by Adam Oswick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Adam Oswick

Bug Description

Summary
-------
When multiple subnet pools are created using the same address scope, attributes such as name and description cannot be updated.

Description
-----------
There is a restriction in place to prevent changing the address scope on a subnet pool when other subnets in the same network would end up on a different address scope.

This is expected however the restriction is applied when updating other attributes on the subnet pool such as the name or description. This is not expected and requires manual updates via the DB or deleting the subnets, changing the required attribute and then recreating the subnets.

This appears to have been introduced by https://review.opendev.org/c/openstack/neutron/+/667511.

Step by step reproduction
-------------------------
$ openstack network create testnet
$ openstack address scope create addressscope1
$ openstack subnet pool create --address-scope addressscope1 --pool-prefix 10.0.1.0/24 subnetpool1
$ openstack subnet pool create --address-scope addressscope1 --pool-prefix 10.0.2.0/24 subnetpool2
$ openstack subnet create --subnet-pool subnetpool1 --prefix-len 24 --network testnet subnet1
$ openstack subnet create --subnet-pool subnetpool2 --prefix-len 24 --network testnet subnet2
$ openstack subnet pool set --name subnetpool1-updated subnetpool1
BadRequestException: 400: Client Error for url: https://openstack:9696/v2.0/subnetpools/265f4cc2-8e94-4c95-8319-123073d316d6, Subnets of the same address family hosted on the same network must all participate in the same address scope

Expected output
---------------
The subnet pool name is changed from subnetpool1 to subnetpool1-updated

Actual output
-------------
The NetworkAddressScopeAffinityError exception is raised.

Version
-------
2024.1

Adam Oswick (adamoswick)
Changed in neutron:
assignee: nobody → Adam Oswick (adamoswick)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.