Skip to content

Instantly share code, notes, and snippets.

@sc68cal
Last active January 1, 2016 20:59
Show Gist options
  • Save sc68cal/8201077 to your computer and use it in GitHub Desktop.
Save sc68cal/8201077 to your computer and use it in GitHub Desktop.

Problems with the subnet mode patch

  • Neutron creates a host file, by iterating the ports member of a network object. It does not check to see if the ports' fixed_ip has allocations from a subnet that does not have DHCP enabled.
  • IPv6 slaac addresses entered into the host file appears to break dnsmasq, v4 leases fail

Contents of /opt/stack/data/neutron/dhcp/a6ace403-ca74-4cef-9431-56fe4b28eacb/host

fa:16:3e:e6:68:ee,host-10-251-2-131.openstacklocal,10.251.2.131
fa:16:3e:e6:68:ee,host-2001-558-ff22-36-f816-3eff-fee6-68ee.openstacklocal,2001:558:ff22:36:f816:3eff:fee6:68ee

Removing the second line allows DHCP to succeed on the instance

stack@osctrl-cc38-b01:~/devstack$ neutron net-list
+--------------------------------------+---------+------------------------------------------------------------+
| id                                   | name    | subnets                                                    |
+--------------------------------------+---------+------------------------------------------------------------+
| a6ace403-ca74-4cef-9431-56fe4b28eacb | default | afcf71b7-e52e-4895-8fa3-c8689143105f 2001:558:ff22:36::/64 |
|                                      |         | cd5bf98f-0616-499a-9424-b4d50b294c80 10.251.2.128/25       |
+--------------------------------------+---------+------------------------------------------------------------+
stack@osctrl-cc38-b01:~/devstack$ neutron subnet-list
+--------------------------------------+--------------+-----------------------+---------------------------------------------------------------------------------+
| id                                   | name         | cidr                  | allocation_pools                                                                |
+--------------------------------------+--------------+-----------------------+---------------------------------------------------------------------------------+
| afcf71b7-e52e-4895-8fa3-c8689143105f | v6_slaac_net | 2001:558:ff22:36::/64 | {"start": "2001:558:ff22:36::2", "end": "2001:558:ff22:36:ffff:ffff:ffff:fffe"} |
| cd5bf98f-0616-499a-9424-b4d50b294c80 | provider_net | 10.251.2.128/25       | {"start": "10.251.2.130", "end": "10.251.2.254"}                                |
+--------------------------------------+--------------+-----------------------+---------------------------------------------------------------------------------+
stack@osctrl-cc38-b01:~/devstack$ neutron subnet-show v6_slaac_net
+------------------+---------------------------------------------------------------------------------+
| Field            | Value                                                                           |
+------------------+---------------------------------------------------------------------------------+
| allocation_pools | {"start": "2001:558:ff22:36::2", "end": "2001:558:ff22:36:ffff:ffff:ffff:fffe"} |
| cidr             | 2001:558:ff22:36::/64                                                           |
| dhcp_modes       |                                                                                 |
| dns_nameservers  |                                                                                 |
| enable_dhcp      | False                                                                           |
| gateway_ip       | 2001:558:ff22:36::1                                                             |
| host_routes      |                                                                                 |
| id               | afcf71b7-e52e-4895-8fa3-c8689143105f                                            |
| ip_version       | 6                                                                               |
| name             | v6_slaac_net                                                                    |
| network_id       | a6ace403-ca74-4cef-9431-56fe4b28eacb                                            |
| tenant_id        | ce252ef37d374378a85909788817c78f                                                |
+------------------+---------------------------------------------------------------------------------+
stack@osctrl-cc38-b01:~/devstack$ neutron port-list
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                                                   |
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------------------------+
| 16227915-bb01-4903-a38e-398fcee22897 |      | fa:16:3e:32:b8:66 | {"subnet_id": "cd5bf98f-0616-499a-9424-b4d50b294c80", "ip_address": "10.251.2.132"}                         |
|                                      |      |                   | {"subnet_id": "afcf71b7-e52e-4895-8fa3-c8689143105f", "ip_address": "2001:558:ff22:36:f816:3eff:fe32:b866"} |
| 47586747-c003-48e9-8150-9c5ebb32c9bf |      | fa:16:3e:e6:68:ee | {"subnet_id": "cd5bf98f-0616-499a-9424-b4d50b294c80", "ip_address": "10.251.2.131"}                         |
|                                      |      |                   | {"subnet_id": "afcf71b7-e52e-4895-8fa3-c8689143105f", "ip_address": "2001:558:ff22:36:f816:3eff:fee6:68ee"} |
| 4fcf1e84-3652-4f19-9f3d-188778c54d9a |      | fa:16:3e:fc:d4:b1 | {"subnet_id": "cd5bf98f-0616-499a-9424-b4d50b294c80", "ip_address": "10.251.2.130"}                         |
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------------------------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment