← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1469573] Re: Updating subnet fails with both allocation-pools and gateway_ip specified

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

** Changed in: neutron
    Milestone: None => liberty-2

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

Title:
  Updating subnet fails with both allocation-pools and gateway_ip
  specified

Status in neutron:
  Fix Released

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-73e0-46ce-806d-1cd4470ea0b4 |
  | mtu                       | 0                                    |
  | name                      | test-net                             |
  | port_security_enabled     | True                                 |
  | provider:network_type     | vxlan                                |
  | provider:physical_network |                                      |
  | provider:segmentation_id  | 1064                                 |
  | router:external           | False                                |
  | shared                    | False                                |
  | status                    | ACTIVE                               |
  | subnets                   |                                      |
  | tenant_id                 | 9a8b1d5da73a4d6e93547e03dc1947bc     |
  +---------------------------+--------------------------------------+
  + neutron subnet-create --name test-sub --allocation-pool start=120.0.0.2,end=120.0.0.254 test-net 120.0.0.0/24
  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-8adc-4caf-867d-8457e61b9578         |
  | ip_version        | 4                                            |
  | ipv6_address_mode |                                              |
  | ipv6_ra_mode      |                                              |
  | name              | test-sub                                     |
  | network_id        | d2478fff-73e0-46ce-806d-1cd4470ea0b4         |
  | subnetpool_id     |                                              |
  | tenant_id         | 9a8b1d5da73a4d6e93547e03dc1947bc             |
  +-------------------+----------------------------------------------+
  + neutron subnet-update test-sub --gateway_ip 120.0.0.9 --allocation-pool start=120.0.0.10,end=120.0.0.254
  Gateway ip 120.0.0.9 conflicts with allocation pool 120.0.0.2-120.0.0.254

  Version-Release:
  stable/kilo

  Environment:
  devstack(All-in-one)
  Ubuntu 14.04.2 LTS

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


References