network-ip-availabilities' result is not correct when the subnet has no allocation-pool
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
Rocky & maybe master:
I create a network and a subnet.
Then, I update the subnet to no-allocation-pool
openstack subnet set 0f4d5c95-
Next,I check the availability ips of the network:
openstack ip availability show 440453b6-
+------
| Field | Value |
+------
| id | 440453b6-
| name | None |
| network_id | 440453b6-
| network_name | yjfaaa |
| project_id | 7be52ee6c397430
| subnet_
| total_ips | 256 |
| used_ips | 3 |
+------
But I can't create port in the network:
openstack port create test --network 440453b6-
{"NeutronError": {"message": "No more IP addresses available on network 440453b6-
description: | updated |
tags: | added: rfe |
tags: | removed: rfe |
Changed in neutron: | |
importance: | Low → Wishlist |
I read about the codes, It will calculate the total ip according to subnet's cidr when the subnet has no IPAllocationPool. I think this is not reasonable. I think we should add a field "available_ips", it is calculated base on IPAllocationPool. The "total_ips" was calculated according to "subnet.cidr".