Port creation fails with error IP already allocated but the IP is available
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Expired
|
Undecided
|
Unassigned |
Bug Description
Description:
=================
When trying to create a new port using an available IP in the allocation pool of a VLAN neutron network, creation fails with error:
IP address 10.41.8.3 already allocated in subnet afb678c6-
Precondition:
=================
A port using the same IP was previously created and then deleted.
How to reproduce:
=================
I have the following network:
$ openstack network show e30b938b-
+------
| Field | Value |
+------
| admin_state_up | UP |
| availability_
| availability_zones | |
| created_at | 2020-11-
| description | |
| dns_domain | |
| id | e30b938b-
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| is_vlan_transparent | None |
| location | cloud='', project.domain_id=, project.
| mtu | 1500 |
| name | test |
| port_security_
| project_id | 606e529ab1bc4b1
| provider:
| provider:
| provider:
| qos_policy_id | None |
| revision_number | 11 |
| router:external | External |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | afb678c6-
| tags | |
| updated_at | 2021-01-
+------
And a subnet
$ openstack subnet show afb678c6-
+------
| Field | Value |
+------
| allocation_pools | 10.41.8.3-10.41.8.4 |
| cidr | 10.41.8.0/29 |
| created_at | 2020-11-
| description | |
| dns_nameservers | |
| dns_publish_
| enable_dhcp | True |
| gateway_ip | 10.41.8.1 |
| host_routes | |
| id | afb678c6-
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| location | cloud='', project.domain_id=, project.
| name | test-subnet |
| network_id | e30b938b-
| prefix_length | None |
| project_id | 606e529ab1bc4b1
| revision_number | 9 |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
| tags | |
| updated_at | 2021-01-
+------
Create a port with a fixed ip:
$ openstack port create --debug --network e30b938b-
Delete the same port
$ openstack port delete a7a37bbf-
Try to create again the same port with same IP and creation fail
$ openstack port create --debug --network e30b938b-
ConflictException: 409: Client Error for url: https:/
ipallocations table show that the IP is actually available:
mysql> select * from ipallocations where network_
+------
| port_id | ip_address | subnet_id | network_id |
+------
| 319c6b0d-
+------
1 row in set (0.00 sec)
mysql> select * from ipallocations where subnet_
+------
| port_id | ip_address | subnet_id | network_id |
+------
| 319c6b0d-
+------
1 row in set (0.00 sec)
Expected output
=================
Port is created successfully
Actual output
=================
Port creation fails with:
ConflictException: 409: Client Error for url: https:/
Version:
=================
This is a cloud bionic-ussuri using ovn deployed using charmed OpenStack
Charms revisions:
charm-neutron-api rev 288
charm-neutron-
charm-ovn-central rev 1
charm-ovn-chassis rev 4
neutron pkgs versions:
ii neutron-common 2:16.1.
ii neutron-
ii neutron-plugin-ml2 2:16.1.
ii neutron-server 2:16.1.
Perceived severity
=================
Critical
If possible, it would be helpful to come up with a workaround, while waiting for a proper resolution.