← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1861032] Re: [RFE] Add support for configuring dnsmasq with multiple IPv6 addresses in same subnet on same port

 

Reviewed:  https://review.opendev.org/704436
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=592c2f8d91c3172c75cc5a2464350891b0a303f1
Submitter: Zuul
Branch:    master

commit 592c2f8d91c3172c75cc5a2464350891b0a303f1
Author: Harald Jensås <hjensas@xxxxxxxxxx>
Date:   Fri Jan 17 12:29:10 2020 +0100

    DHCPv6 - Use addr6_list in dnsmasq
    
    Adds a new bool option dnsmasq_enable_addr6_list, when
    enabled configuration for dnsmasq will be created with a
    single dhcp-host entry specifying a list of ip addresses
    allocated for a port.
    
    Previously the dnsmasq dhcp-agent driver would write a
    separate dhcp-host entry for each fixed-ip of a port in
    the dnsmasq hosts file. The result of the previous
    behaviour is that dnsmasq will only use one of the config
    entries, i.e the first one matching the mac identifier.
    
    The trade-off is that only a single dns_assignment will
    be used for IPv6 addresses within the same subnet. (But
    in practice, this was always the case since only the
    first config entry would be used by dnsmasq.)
    
    Why is this neccecary:
      This is done to enable ironic provisioning over IPv6
      using DHCPv6-stateful. For background info, please
      read dnsmasq-discuss thread:
    http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2020q1/thread.html#13671
    
    Closes-Bug: #1861032
    Change-Id: I833840e7daed2efa7efaece27cfd1ba28e0feb90


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  [RFE] Add support for configuring dnsmasq with multiple IPv6 addresses
  in same subnet on same port

Status in neutron:
  Fix Released

Bug description:
  To enable network boot and Ironic provisioning a patch has been
  proposed to dnsmasq. The patch add's the possibility to provide list's
  of individual addresses as well as prefixed ranges of ipv6 addresses
  for a dhcp-host reservation.

  When dnsmasq recieve a request matching the clid or mac address is
  recieved the server will iterate over all candidate addresses until it
  find's one that is not already leased to a different clid/iaid and
  advertise this address.

  Using multiple reservations for a single host makes it possible to
  maintain a static leases only configuration which support network
  booting systems with UEFI firmware that request a new address (a new
  SOLICIT with a new IA_NA option using a new IAID) for different boot
  modes, for instance 'PXE over IPv6', and 'HTTP-Boot over IPv6'. Open
  Virtual Machine Firmware (OVMF) and most UEFI firmware build on the
  EDK2 code base exhibit this behaviour.

  A new configuration syntax is introduces in dnsmasq in patch:
  http://lists.thekelleys.org.uk/pipermail/dnsmasq-
  discuss/2020q1/013743.html

  For example:

   --dhcp-
  host=52:54:00:3f:5c:c0,[fd12:3456::aa02][fd12:3456::aa04],host1

  The above will make the two addresses fd12:3456::aa02 and
  fd12:3456::aa04 available to the host with hardware address
  52:54:00:3f:5c:c0.

  
  This RFE is to add functionality to the dnsmasq dhcp-agent implementation to write the new configuration format in the dnsmasq hosts file.

  Given a neutron port:

      "ports": [
          {
              "dns_assignment": [
                 {
                    "hostname": "myport02",
                     "ip_address": "fd12:3456::aa02",
                     "fqdn": "myport02.my-domain.org"
                 },
                 {
                    "hostname": "myport04",
                     "ip_address": "fd12:3456::aa04",
                     "fqdn": "myport04.my-domain.org"
                 },
              ],
              "fixed_ips": [
                  {
                      "ip_address": "fd12:3456::aa02",
                      "subnet_id": "008ba151-0b8c-4a67-98b5-0d2b87666062"
                  },
                  {
                      "ip_address": "fd12:3456::aa04",
                      "subnet_id": "008ba151-0b8c-4a67-98b5-0d2b87666062"
                  }

              ],
              "id": "d80b1a3b-4fc1-49f3-952e-1e2ab7081d8b",
              "mac_address": "fa:16:3e:58:42:ed",
              "network_id": "70c1db1f-b701-45bd-96e0-a313ee3430b3",

          },
      ]
  }

  
  Current behaviour
  -----------------
    dhcp-host=fa:16:3e:58:42:ed,myport02.my-domain.org,[fd12:3456::aa02]
    dhcp-host=fa:16:3e:58:42:ed,myport04.my-domain.org,[fd12:3456::aa04]

    NOTE, this configuration means dnsmasq will only ever lease
  fd12:3456::aa04. As it will always find that as the first valid
  configuration for mac fa:16:3e:58:42:ed. In other words, the _current
  behaviour is broken_.

  New behaviour
  -------------
    dhcp-host=fa:16:3e:58:42:ed,myport02.my-domain.org,[fd12:3456::aa02][fd12:3456::aa04]

    This will allow dnsmasq to lase both addresses when requests from
  the client mac using different IAID's is recieved.

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


References