networking-ovn doesn't define a default dns_server option in the DHCP_Options table for subnets without dns_nameservers defined

Bug #1774052 reported by Numan Siddique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
Undecided
Numan Siddique
tripleo
Fix Released
Medium
Numan Siddique

Bug Description

This is a behavioural difference with ml2/ovs and the dhcp-agent.

In the reference implementation, when a subnet is created, if no dns servers is provided the dhcp resolution will point to the dnsmasq port instance, which will resolv internal dns requests, and forward the unknown ones upstream.

In the case of networking-ovn, we don't create a dhcp port for dhcp purposes. We just capture instance outgoing DNS queries, and respond to the internal ones, while the external ones are sent back to network. such implementation requires that at least one dns server has been configured via DHCP to the instance. But if during subnet creation the dns-server / dns-servers field was left unspecified, the internal dns server won't work.

A temporary workaround is configuring the upstream dns server when creating the subnet:

neutron subnet-update 4db68a2b-62e9-4660-9163-3e512eb47b2b --dns-nameserver 8.8.8.8

Changed in networking-ovn:
assignee: nobody → Numan Siddique (numansiddique)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (master)

Fix proposed to branch: master
Review: https://review.openstack.org/571006

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/571006
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=ff5a4a0f6b8867066b666d5e63116691e8d223bb
Submitter: Zuul
Branch: master

commit ff5a4a0f6b8867066b666d5e63116691e8d223bb
Author: Numan Siddique <email address hidden>
Date: Wed May 30 00:49:57 2018 +0530

    Add default dns_server option in DHCP_Options table

    If a subnet is not defined with dns_nameservers option, then networking-ovn
    doesn't add any default 'dns_server' DHCPv4 option in the DHCP_Options table.

    This patch addresses this issue by
     - Introducing a config option - 'dns_servers' similar to 'dnsmasq_dns_servers'
       config option supported by dhcp agent and uses it as the 'dns_server' DHCPv4 option
       in the DHCP_Options table.

     - If the 'dns_servers' option is not defined, then it uses the system dns resolvers
       from the /etc/resolv.conf.

    Closes-bug: #1774052
    Change-Id: Ibf6396232f8eac780baa676b0b8395082d5c3527

Changed in networking-ovn:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/571679

Changed in tripleo:
assignee: nobody → Numan Siddique (numansiddique)
status: New → In Progress
Changed in tripleo:
importance: Undecided → Medium
milestone: none → rocky-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/571958

Changed in tripleo:
milestone: rocky-2 → rocky-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 5.0.0.0b2

This issue was fixed in the openstack/networking-ovn 5.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/queens)

Reviewed: https://review.openstack.org/571679
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=c3a383e9f7727ee3e40b1c2045dc75f3beb0d7d8
Submitter: Zuul
Branch: stable/queens

commit c3a383e9f7727ee3e40b1c2045dc75f3beb0d7d8
Author: Numan Siddique <email address hidden>
Date: Wed May 30 00:49:57 2018 +0530

    Add default dns_server option in DHCP_Options table

    If a subnet is not defined with dns_nameservers option, then networking-ovn
    doesn't add any default 'dns_server' DHCPv4 option in the DHCP_Options table.

    This patch addresses this issue by
     - Introducing a config option - 'dns_servers' similar to 'dnsmasq_dns_servers'
       config option supported by dhcp agent and uses it as the 'dns_server' DHCPv4 option
       in the DHCP_Options table.

     - If the 'dns_servers' option is not defined, then it uses the system dns resolvers
       from the /etc/resolv.conf.

    Closes-bug: #1774052
    Change-Id: Ibf6396232f8eac780baa676b0b8395082d5c3527
    (cherry picked from commit ff5a4a0f6b8867066b666d5e63116691e8d223bb)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/571958
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=371e5d626491a042afcd5d83377737ae941beb67
Submitter: Zuul
Branch: master

commit 371e5d626491a042afcd5d83377737ae941beb67
Author: Numan Siddique <email address hidden>
Date: Sun Jun 3 13:01:49 2018 +0530

    ovn: Add dns_servers configuration support

    networking-ovn optionally expects list of dns server to be defined in the
    config -'ovn/dns_servers'. These will be included in the 'dns_server' DHCP
    option field when the VMs send DHCP request if the subnet's dns_nameservers field
    is not defined by the user.

    This patch sets the hieradata - 'neutron::plugins::ml2::ovn::dns_servers' to the
    defined OVNDnsServers t-h-t param.

    Change-Id: I80574f7badfcc618254266051c8d6661c08e2be0
    Closes-bug: #1774052

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/578450

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/queens)

Reviewed: https://review.openstack.org/578450
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=befe2c8cfd2ee7f9ca1ba74cebbdf5ed2b71436e
Submitter: Zuul
Branch: stable/queens

commit befe2c8cfd2ee7f9ca1ba74cebbdf5ed2b71436e
Author: Numan Siddique <email address hidden>
Date: Sun Jun 3 13:01:49 2018 +0530

    ovn: Add dns_servers configuration support

    networking-ovn optionally expects list of dns server to be defined in the
    config -'ovn/dns_servers'. These will be included in the 'dns_server' DHCP
    option field when the VMs send DHCP request if the subnet's dns_nameservers field
    is not defined by the user.

    This patch sets the hieradata - 'neutron::plugins::ml2::ovn::dns_servers' to the
    defined OVNDnsServers t-h-t param.

    Change-Id: I80574f7badfcc618254266051c8d6661c08e2be0
    Closes-bug: #1774052
    (cherry picked from 371e5d626491a042afcd5d83377737ae941beb67)
    Conflicts:
           environments/services/neutron-ovn-hw-offload.yaml

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.0.4

This issue was fixed in the openstack/tripleo-heat-templates 8.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.0.0.0b4

This issue was fixed in the openstack/tripleo-heat-templates 9.0.0.0b4 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 4.0.3

This issue was fixed in the openstack/networking-ovn 4.0.3 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.