← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2074092] [NEW] Subnet pool attribute updates fail when using address scopes

 

Public bug reported:

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

** Affects: neutron
     Importance: Undecided
     Assignee: Adam Oswick (adamoswick)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => Adam Oswick (adamoswick)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2074092

Title:
  Subnet pool attribute updates fail when using address scopes

Status in neutron:
  New

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2074092/+subscriptions