← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1478080] Re: neutron allows to create invalid floating IP

 

I am afraid this is an invalid bug. I guess you created a bulk of
floating ips with 'floating-ip-bulk-create 31.28.168.160/29' and then
tried to use neutron to allocate 31.28.168.167.  Please note that
command is just for nova-network, not neutron. If you are using neutron,
you should check the available floating ips from output of subnet-show,
the field of allocation_pools which should already handle the broadcast
and gateway address.

ubuntu@node-01:~/workspace/devstack$ neutron subnet-show public-subnet
+-------------------+------------------------------------------------+
| Field             | Value                                          |
+-------------------+------------------------------------------------+
| allocation_pools  | {"start": "172.24.4.2", "end": "172.24.4.254"} |   <== check this field.
| cidr              | 172.24.4.0/24                                  |
| dns_nameservers   |                                                |
| enable_dhcp       | False                                          |
| gateway_ip        | 172.24.4.1                                     |
| host_routes       |                                                |
| id                | 3a2fa533-af31-4a3e-aa6b-2a419e0a0188           |
| ip_version        | 4                                              |
| ipv6_address_mode |                                                |
| ipv6_ra_mode      |                                                |
| name              | public-subnet                                  |
| network_id        | 9ec95cbd-4014-477c-9134-53f2c3688eba           |
| subnetpool_id     |                                                |
| tenant_id         | 9f960b3c48114a77b7e962b2dc249c9c               |
+-------------------+------------------------------------------------+

Here is an example to create bulk floating ips for neutron:

ubuntu@node-01:~$ neutron subnet-create --allocation-pool start=31.28.168.160,end=31.28.168.167 --name test-net --disable-dhcp --ip-version 4 public 31.28.168.160/29
The allocation pool 31.28.168.160-31.28.168.167 spans beyond the subnet cidr 31.28.168.160/29.
ubuntu@node-01:~$ neutron subnet-create --allocation-pool start=31.28.168.160,end=31.28.168.166 --name test-net --disable-dhcp --ip-version 4 public 31.28.168.160/29
The allocation pool 31.28.168.160-31.28.168.166 spans beyond the subnet cidr 31.28.168.160/29.
ubuntu@node-01:~$ neutron subnet-create --allocation-pool start=31.28.168.161,end=31.28.168.166 --name test-net --disable-dhcp --ip-version 4 public 31.28.168.160/29
Gateway ip 31.28.168.161 conflicts with allocation pool 31.28.168.161-31.28.168.166

ubuntu@node-01:~$ neutron subnet-create --allocation-pool start=31.28.168.162,end=31.28.168.166 --name test-net --disable-dhcp --ip-version 4 public 31.28.168.160/29
Created a new subnet:
+-------------------+----------------------------------------------------+
| Field             | Value                                              |
+-------------------+----------------------------------------------------+
| allocation_pools  | {"start": "31.28.168.162", "end": "31.28.168.166"} |
| cidr              | 31.28.168.160/29                                   |
| dns_nameservers   |                                                    |
| enable_dhcp       | False                                              |
| gateway_ip        | 31.28.168.161                                      |
| host_routes       |                                                    |
| id                | 8846584f-b0ff-4f75-a679-16705c9964fd               |
| ip_version        | 4                                                  |
| ipv6_address_mode |                                                    |
| ipv6_ra_mode      |                                                    |
| name              | test-net                                           |
| network_id        | 9ec95cbd-4014-477c-9134-53f2c3688eba               |
| subnetpool_id     |                                                    |
| tenant_id         | 9f960b3c48114a77b7e962b2dc249c9c                   |
+-------------------+----------------------------------------------------+


** Changed in: neutron
       Status: New => Invalid

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

Title:
  neutron allows to create invalid floating IP

Status in neutron:
  Invalid

Bug description:
  Neutron allows to create floating IP 31.28.168.167, which is broadcast
  address.

  I think it should raise exception.

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


References