← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1437499] Re: init_l3 should consider all address scopes

 

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

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

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

Title:
  init_l3 should consider all address scopes

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  Currently init_l3 retrieves the list of global addresses from the
  kernel on a specific device in a network namespace. If any of the
  addresses are not in the ip_cidrs argument to init_l3, they will be
  deleted. The problem with only listing global addresses is that if a
  site-local or link-local address is added during a subnet-create, and
  the user wishes to later delete the address, init_l3 will never
  consider that address for deletion.

  To fix this, init_l3 should not limit its scope when listing addresses
  on an interface. It should, however, ignore the default IPv6 link-
  local address assigned by the operating system as this address is not
  known to Neutron and should not be deleted.

  Steps to reproduce:

  dboik@bxb-ds-49:~/devstack$ neutron subnet-create --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name link private fe80:cafe:dead:beef::/64
  Created a new subnet:
  +-------------------+---------------------------------------------------------------------------------------+
  | Field             | Value                                                                                 |
  +-------------------+---------------------------------------------------------------------------------------+
  | allocation_pools  | {"start": "fe80:cafe:dead:beef::2", "end": "fe80:cafe:dead:beef:ffff:ffff:ffff:fffe"} |
  | cidr              | fe80:cafe:dead:beef::/64                                                              |
  | dns_nameservers   |                                                                                       |
  | enable_dhcp       | True                                                                                  |
  | gateway_ip        | fe80:cafe:dead:beef::1                                                                |
  | host_routes       |                                                                                       |
  | id                | f40e6e8d-49cd-4028-ad09-856bd741f7ca                                                  |
  | ip_version        | 6                                                                                     |
  | ipv6_address_mode | slaac                                                                                 |
  | ipv6_ra_mode      | slaac                                                                                 |
  | name              | link                                                                                  |
  | network_id        | 4a9e2ed1-7879-46fd-8e97-442938d77227                                                  |
  | subnetpool_id     |                                                                                       |
  | tenant_id         | d288832359484118929c2966a925b15f                                                      |
  +-------------------+---------------------------------------------------------------------------------------+
  dboik@bxb-ds-49:~/devstack$ neutron router-interface-add router1 link
  Added interface f4d7956d-ead2-4a49-9a6e-b11a265961bd to router router1.
  dboik@bxb-ds-49:~/devstack$ neutron router-port-list router1
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                                     |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------------------+
  | 117bed46-afb5-4dcc-bfb2-1225a6fd618e |      | fa:16:3e:86:4e:48 | {"subnet_id": "d2128984-7286-44b8-9cd9-715f3a631581", "ip_address": "172.24.4.2"}             |
  |                                      |      |                   | {"subnet_id": "74bb178d-70b9-43ae-80a7-c4afa32d7fcf", "ip_address": "2001:420:2c50:200a::2"}  |
  | ab032480-9f52-48cf-aaa7-cee97cf3c678 |      | fa:16:3e:11:4e:d9 | {"subnet_id": "5874654d-d3b4-464f-b020-22b7eb0a3b0d", "ip_address": "10.0.0.1"}               |
  | f4d7956d-ead2-4a49-9a6e-b11a265961bd |      | fa:16:3e:41:03:42 | {"subnet_id": "85b6ddc6-a4fe-45d7-97c4-8adee2491b66", "ip_address": "fd42:002c:5020:0a00::1"} |
  |                                      |      |                   | {"subnet_id": "f40e6e8d-49cd-4028-ad09-856bd741f7ca", "ip_address": "fe80:cafe:dead:beef::1"} |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------------------+
  dboik@bxb-ds-49:~/devstack$ sudo ip netns exec qrouter-45c1366e-9bda-40ea-b5a3-289226b82a2e ifconfig qr-f4d7956d-ea
  qr-f4d7956d-ea Link encap:Ethernet  HWaddr fa:16:3e:41:03:42
            inet6 addr: fd42:2c:5020:a00::1/64 Scope:Global
            inet6 addr: fe80::f816:3eff:fe41:342/64 Scope:Link
            inet6 addr: fe80:cafe:dead:beef::1/64 Scope:Link
            UP BROADCAST RUNNING  MTU:1500  Metric:1
            RX packets:2 errors:0 dropped:0 overruns:0 frame:0
            TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:148 (148.0 B)  TX bytes:7526 (7.5 KB)

  dboik@bxb-ds-49:~/devstack$ neutron router-interface-delete router1 link
  Removed interface from router router1.
  dboik@bxb-ds-49:~/devstack$ neutron router-port-list router1
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                                     |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------------------+
  | 117bed46-afb5-4dcc-bfb2-1225a6fd618e |      | fa:16:3e:86:4e:48 | {"subnet_id": "d2128984-7286-44b8-9cd9-715f3a631581", "ip_address": "172.24.4.2"}             |
  |                                      |      |                   | {"subnet_id": "74bb178d-70b9-43ae-80a7-c4afa32d7fcf", "ip_address": "2001:420:2c50:200a::2"}  |
  | ab032480-9f52-48cf-aaa7-cee97cf3c678 |      | fa:16:3e:11:4e:d9 | {"subnet_id": "5874654d-d3b4-464f-b020-22b7eb0a3b0d", "ip_address": "10.0.0.1"}               |
  | f4d7956d-ead2-4a49-9a6e-b11a265961bd |      | fa:16:3e:41:03:42 | {"subnet_id": "85b6ddc6-a4fe-45d7-97c4-8adee2491b66", "ip_address": "fd42:002c:5020:0a00::1"} |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------------------+
  dboik@bxb-ds-49:~/devstack$ sudo ip netns exec qrouter-45c1366e-9bda-40ea-b5a3-289226b82a2e ifconfig qr-f4d7956d-ea
  qr-f4d7956d-ea Link encap:Ethernet  HWaddr fa:16:3e:41:03:42
            inet6 addr: fd42:2c:5020:a00::1/64 Scope:Global
            inet6 addr: fe80::f816:3eff:fe41:342/64 Scope:Link
            inet6 addr: fe80:cafe:dead:beef::1/64 Scope:Link
            UP BROADCAST RUNNING  MTU:1500  Metric:1
            RX packets:2 errors:0 dropped:0 overruns:0 frame:0
            TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:148 (148.0 B)  TX bytes:9180 (9.1 KB)

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


References