Network's subnets with different subnet pools

Bug #1790038 reported by Songlian Li on 2018-08-31
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Unassigned

Bug Description

I created two subnet pools all belong to the same address scope.
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| address_scope_id | a86423de-dee6-41b3-a7bf-f7dfef27919d |
| created_at | 2018-08-31T09:55:16Z |
| default_prefixlen | 28 |
| default_quota | None |
| description | |
| id | f3123096-c566-4962-9760-37e0ad118b76 |
| ip_version | 4 |
| is_default | False |
| max_prefixlen | 32 |
| min_prefixlen | 8 |
| name | subnet-pool-ip4-2 |
| prefixes | 192.168.100.0/24 |
| project_id | a4d6cb4de22746458041f74e77987832 |
| revision_number | 0 |
| shared | True |
| tags | |
| updated_at | 2018-08-31T09:55:16Z |
+-------------------+--------------------------------------+
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| address_scope_id | a86423de-dee6-41b3-a7bf-f7dfef27919d |
| created_at | 2018-08-30T15:42:06Z |
| default_prefixlen | 26 |
| default_quota | None |
| description | |
| id | d977634a-fb6d-42db-8c8e-e3f8248c24ec |
| ip_version | 4 |
| is_default | False |
| max_prefixlen | 32 |
| min_prefixlen | 8 |
| name | subnet-pool-ip4 |
| prefixes | 203.0.112.0/21 |
| project_id | a4d6cb4de22746458041f74e77987832 |
| revision_number | 0 |
| shared | True |
| tags | |
| updated_at | 2018-08-30T15:42:06Z |
+-------------------+--------------------------------------+

Then I create a network, "openstack network create --provider-network-type vlan network"
Then I want to create two subnets, with different subnet pools. The first one is successfully created, but the second on fails with "BadRequestException: Unknown error"

THe OpenStack version is queens. And it is installed in a Ubuntu 16.04 server.

Thanks

tags: added: l3-ipam-dhcp
Gary Kotton (garyk) wrote :

Can you please provide the neutron log?

Bernard Cafarelli (bcafarel) wrote :

The "BadRequestException: Unknown error" error is a generic one as neutron-server rejects the request (proper error is displayed in Rocky, you may have more info with debug enabled).

The actual error:
$ openstack subnet create --subnet-pool pool2 subnet2 --network testnet
BadRequestException: 400: Client Error for url: http://10.41.1.22:9696/v2.0/subnets, {"NeutronError": {"message": "Subnets hosted on the same network must be allocated from the same subnet pool.", "type": "NetworkSubnetPoolAffinityError", "detail": ""}}

If the pools you used are the ones listed in comment 0, you most likely have the same result.

I cannot find a relevant report/review on the CLI not reporting errors properly, but on the neutron side I would say this is the intended behavior (rejecting that second subnet)

Bernard Cafarelli (bcafarel) wrote :

For reference, fix to get actual error is https://review.openstack.org/#/c/571101/ (Rocky and newer)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers