Updating subnet fails with both allocation-pools and gateway_ip specified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Tomoaki Sato |
Bug Description
Subnet updating with both allocation-pool and gateway_ip options is failing if parameter of the gateway_ip conflicts with allocation pools in db even if the parameter of gateway_ip not conflicts with parameters of the allocation-pool.
Steps to reproduce:
1. Create one network.
2. Create one subnet under the above network with allocation pool provided. i.e “neutron subnet-create --name <NAME> --allocation-pool start=<start IP>,end=<end IP> <NETWORK> <CIDR>”
3. Issue command "neutron subnet-update <NAME> --gateway_ip <GATEWAY_ IP> --allocation-pool start=<new start IP>,end=<new end IP>" where <GATEWAY_IP> is not in the range <new start IP>-<new end IP> but in the current allocation pool range <start IP>-<end IP>.
Actual results:
The above command fails with "gateway ip <GATEWAY_IP> conflicts with allocation pool <start IP>-<end IP>" where <start IP>-<end IP> is the current allocation pool range of the above subnet.
Expected results:
success-full subnet updated
Example of failure:
+ neutron net-create test-net
Created a new network:
+------
| Field | Value |
+------
| admin_state_up | True |
| id | d2478fff-
| mtu | 0 |
| name | test-net |
| port_security_
| provider:
| provider:
| provider:
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 9a8b1d5da73a4d6
+------
+ neutron subnet-create --name test-sub --allocation-pool start=120.
Created a new subnet:
+------
| Field | Value |
+------
| allocation_pools | {"start": "120.0.0.2", "end": "120.0.0.254"} |
| cidr | 120.0.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 120.0.0.1 |
| host_routes | |
| id | b3eb60d2-
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | test-sub |
| network_id | d2478fff-
| subnetpool_id | |
| tenant_id | 9a8b1d5da73a4d6
+------
+ neutron subnet-update test-sub --gateway_ip 120.0.0.9 --allocation-pool start=120.
Gateway ip 120.0.0.9 conflicts with allocation pool 120.0.0.
Version-Release:
stable/kilo
Environment:
devstack(
Ubuntu 14.04.2 LTS
Changed in neutron: | |
assignee: | nobody → Tomoaki Sato (tomoaki-sato) |
Changed in neutron: | |
status: | New → In Progress |
Changed in neutron: | |
status: | In Progress → Fix Committed |
Changed in neutron: | |
milestone: | none → liberty-2 |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | liberty-2 → 7.0.0 |
https:/ /review. openstack. org/#/c/ 196487/
(why the link did not generate ?)