← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1316444] [NEW] IPs from dhcp disabled subnets are added to host file when multiple subnets

 

Public bug reported:

If a network has many subnets, and some have dhcp enabled and some
don't, then ips from all subnets are added to the dnsmasq host file.

Step:
$ neutron net-create net44
$ neutron subnet-create net44 10.0.10.0/24 --name sub1 --enable_dhcp true
$ neutron subnet-create net44 10.0.20.0/24 --name sub2 --enable_dhcp false

$ neutron subnet-list --fields id --fields name
+--------------------------------------+----------------+
| id                                   | name           |
+--------------------------------------+----------------+
| 4e32d76e-4c3a-458c-a250-69856ac325c2 | sub1           |
| c5f0d5a4-227b-4f60-914f-88c6f1b03525 | sub2           |
| e2de152d-a6dc-431e-8ca4-758601161f84 | private-subnet |
+--------------------------------------+----------------+

$ neutron port-create net44 \
    --fixed-ip subnet_id=4e32d76e-4c3a-458c-a250-69856ac325c2 \
     --fixed-ip subnet_id=c5f0d5a4-227b-4f60-914f-88c6f1b03525 
+-----------------------+----------------------------------------------------------------------------------+
| Field                 | Value                                                                            |
+-----------------------+----------------------------------------------------------------------------------+
| admin_state_up        | True                                                                             |
| allowed_address_pairs |                                                                                  |
| binding:vnic_type     | normal                                                                           |
| device_id             |                                                                                  |
| device_owner          |                                                                                  |
| extra_dhcp_opts       |                                                                                  |
| fixed_ips             | {"subnet_id": "4e32d76e-4c3a-458c-a250-69856ac325c2", "ip_address": "10.0.10.2"} |
|                       | {"subnet_id": "c5f0d5a4-227b-4f60-914f-88c6f1b03525", "ip_address": "10.0.20.2"} |
| id                    | 86b2b51b-a0e3-4f74-bb7d-e76eab90c9ed                                             |
| mac_address           | fa:16:3e:c7:15:82                                                                |
| name                  |                                                                                  |
| network_id            | fab1f41e-d9a4-4ca9-bce3-bb5321822958                                             |
| security_groups       | b572b0b9-2fe3-4651-a903-f0dfbaf1c433                                             |
| status                | DOWN                                                                             |
| tenant_id             | 15a0f58023434a78a13bf44e277580ef                                                 |
+-----------------------+----------------------------------------------------------------------------------+


vagrant@devstack:~$ cat /opt/stack/data/neutron/dhcp/fab1f41e-d9a4-4ca9-bce3-bb5321822958/host 
fa:16:3e:c7:15:82,host-10-0-10-2.openstacklocal,10.0.10.2
fa:16:3e:c7:15:82,host-10-0-20-2.openstacklocal,10.0.20.2

** Affects: neutron
     Importance: Undecided
     Assignee: Darragh O'Reilly (darragh-oreilly)
         Status: In Progress


** Tags: l3-ipam-dhcp

** Changed in: neutron
     Assignee: (unassigned) => Darragh O'Reilly (darragh-oreilly)

** Changed in: neutron
       Status: New => In Progress

** Tags added: l3-ipam-dhcp

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

Title:
  IPs from dhcp disabled subnets are added to host file when multiple
  subnets

Status in OpenStack Neutron (virtual network service):
  In Progress

Bug description:
  If a network has many subnets, and some have dhcp enabled and some
  don't, then ips from all subnets are added to the dnsmasq host file.

  Step:
  $ neutron net-create net44
  $ neutron subnet-create net44 10.0.10.0/24 --name sub1 --enable_dhcp true
  $ neutron subnet-create net44 10.0.20.0/24 --name sub2 --enable_dhcp false

  $ neutron subnet-list --fields id --fields name
  +--------------------------------------+----------------+
  | id                                   | name           |
  +--------------------------------------+----------------+
  | 4e32d76e-4c3a-458c-a250-69856ac325c2 | sub1           |
  | c5f0d5a4-227b-4f60-914f-88c6f1b03525 | sub2           |
  | e2de152d-a6dc-431e-8ca4-758601161f84 | private-subnet |
  +--------------------------------------+----------------+

  $ neutron port-create net44 \
      --fixed-ip subnet_id=4e32d76e-4c3a-458c-a250-69856ac325c2 \
       --fixed-ip subnet_id=c5f0d5a4-227b-4f60-914f-88c6f1b03525 
  +-----------------------+----------------------------------------------------------------------------------+
  | Field                 | Value                                                                            |
  +-----------------------+----------------------------------------------------------------------------------+
  | admin_state_up        | True                                                                             |
  | allowed_address_pairs |                                                                                  |
  | binding:vnic_type     | normal                                                                           |
  | device_id             |                                                                                  |
  | device_owner          |                                                                                  |
  | extra_dhcp_opts       |                                                                                  |
  | fixed_ips             | {"subnet_id": "4e32d76e-4c3a-458c-a250-69856ac325c2", "ip_address": "10.0.10.2"} |
  |                       | {"subnet_id": "c5f0d5a4-227b-4f60-914f-88c6f1b03525", "ip_address": "10.0.20.2"} |
  | id                    | 86b2b51b-a0e3-4f74-bb7d-e76eab90c9ed                                             |
  | mac_address           | fa:16:3e:c7:15:82                                                                |
  | name                  |                                                                                  |
  | network_id            | fab1f41e-d9a4-4ca9-bce3-bb5321822958                                             |
  | security_groups       | b572b0b9-2fe3-4651-a903-f0dfbaf1c433                                             |
  | status                | DOWN                                                                             |
  | tenant_id             | 15a0f58023434a78a13bf44e277580ef                                                 |
  +-----------------------+----------------------------------------------------------------------------------+

  
  vagrant@devstack:~$ cat /opt/stack/data/neutron/dhcp/fab1f41e-d9a4-4ca9-bce3-bb5321822958/host 
  fa:16:3e:c7:15:82,host-10-0-10-2.openstacklocal,10.0.10.2
  fa:16:3e:c7:15:82,host-10-0-20-2.openstacklocal,10.0.20.2

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


Follow ups

References