← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1657814] Re: Incorrect DNS assignment

 

So in both cases, (Volodymyr's) and Jens, since there are no external
DNS services involved, we are talking about the Networking service
internal DNS resolution, described here:
http://docs.openstack.org/newton/networking-guide/config-dns-int.html
#the-networking-service-internal-dns-resolution. Please note that this
section clearly states that "After re-starting the neutron-server, users
will be able to assign a dns_name attribute to their ports". The section
goes further explaining how the port's dns_assigment attribute is
created by "concatenating the port’s dns_name with the value configured
in the dns_domain parameter in neutron.conf". There is no mention
whatsoever of the network's dns_domain attribute. All this reflects the
spec that was approved by the community for the implementation of this
functionality: https://specs.openstack.org/openstack/neutron-
specs/specs/liberty/internal-dns-resolution.html. Again, this spec
doesn't mention any dns_domain attribute for networks, which was added
for the integration with external DNS services.

As for the bug about the deprecation of dhcp_domain in dhcp_agent.ini
(https://bugs.launchpad.net/neutron/+bug/1583769), that was fixed
recently by this patchset: https://review.openstack.org/#/c/406243

** Changed in: neutron
       Status: Confirmed => Invalid

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

Title:
  Incorrect DNS assignment

Status in neutron:
  Invalid

Bug description:
  Dear friends,

  the problem is in the following: Neutron assign global "dns_domain"
  value (specified in neutron.conf) to ports in project's network
  regardless of network's "dns_domain" value specified in network
  definition and incorrectly updates dnsmasq.

  # cat /etc/neutron/neutron.conf |grep dns_domain
  dns_domain = yo.

  # cat /etc/neutron/plugins/ml2/ml2_conf.ini |grep dns
  extension_drivers = port_security,dns

  
  # openstack network show ctl-net
  +---------------------------+--------------------------------------+
  | Field                     | Value                                |
  +---------------------------+--------------------------------------+
  | admin_state_up            | UP                                   |
  | availability_zone_hints   |                                      |
  | availability_zones        | nova                                 |
  | created_at                | 2017-01-19T15:19:12Z                 |
  | description               |                                      |
  | dns_domain                | ctl.ams.                             | <--- specific domain
  | id                        | c1d688da-a92e-4fc0-bdc5-d9361a8e15b6 |
  | ipv4_address_scope        | None                                 |
  | ipv6_address_scope        | None                                 |
  | mtu                       | 1450                                 |
  | name                      | ctl-net                              |
  | port_security_enabled     | True                                 |
  | project_id                | 1a69577c17884582861ec3904cd957cf     |
  | project_id                | 1a69577c17884582861ec3904cd957cf     |
  | provider:network_type     | vxlan                                |
  | provider:physical_network | None                                 |
  | provider:segmentation_id  | 101                                  |
  | revision_number           | 6                                    |
  | router:external           | Internal                             |
  | shared                    | False                                |
  | status                    | ACTIVE                               |
  | subnets                   | a9294448-9ebb-42be-8597-b206f3efc018 |
  | tags                      | []                                   |
  | updated_at                | 2017-01-19T15:19:14Z                 |
  +---------------------------+--------------------------------------+

  # neutron port-create --name poi --dns-name poi ctl-net
  Created a new port:
  +-----------------------+-------------------------------------------------------------------+
  | Field                 | Value                                                             |
  +-----------------------+-------------------------------------------------------------------+
  | admin_state_up        | True                                                              |
  | allowed_address_pairs |                                                                   |
  | binding:host_id       |                                                                   |
  | binding:profile       | {}                                                                |
  | binding:vif_details   | {}                                                                |
  | binding:vif_type      | unbound                                                           |
  | binding:vnic_type     | normal                                                            |
  | created_at            | 2017-01-19T15:34:32Z                                              |
  | description           |                                                                   |
  | device_id             |                                                                   |
  | device_owner          |                                                                   |
  | dns_assignment        | {"hostname": "poi", "ip_address": "10.16.1.21", "fqdn": "poi.yo."}|<- YO!
  | dns_name              | poi                                                               |
  | extra_dhcp_opts       |                                                                   |
  | fixed_ips             | {"subnet_id": "a9294448-9ebb-42be-8597-b206f3efc018",             |
  |                       |  "ip_address": "10.16.1.21"}                                      |
  | id                    | 5f002d62-267f-4470-a6af-c14119b1de61                              |
  | mac_address           | fa:16:3e:e7:a5:f8                                                 |
  | name                  | poi                                                               |
  | network_id            | c1d688da-a92e-4fc0-bdc5-d9361a8e15b6                              |
  | port_security_enabled | True                                                              |
  | project_id            | 1a69577c17884582861ec3904cd957cf                                  |
  | revision_number       | 6                                                                 |
  | security_groups       | 5b6f09b1-1482-4597-a588-028ad1d84d69                              |
  | status                | DOWN                                                              |
  | tenant_id             | 1a69577c17884582861ec3904cd957cf                                  |
  | updated_at            | 2017-01-19T15:34:33Z                                              |
  +-----------------------+-------------------------------------------------------------------+

  # ps ax |grep dnsmasq |grep 10.16
   5264 ?        S      0:00 dnsmasq --no-hosts --no-resolv --strict-order --except-interface=lo --pid-file=/var/lib/neutron/dhcp/c1d688da-a92e-4fc0-bdc5-d9361a8e15b6/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/c1d688da-a92e-4fc0-bdc5-d9361a8e15b6/host --addn-hosts=/var/lib/neutron/dhcp/c1d688da-a92e-4fc0-bdc5-d9361a8e15b6/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/c1d688da-a92e-4fc0-bdc5-d9361a8e15b6/opts --dhcp-leasefile=/var/lib/neutron/dhcp/c1d688da-a92e-4fc0-bdc5-d9361a8e15b6/leases --dhcp-match=set:ipxe,175 --bind-interfaces --interface=ns-15b1820b-19 --dhcp-range=set:tag0,10.16.1.0,static,86400s --dhcp-option-force=option:mtu,1450 --dhcp-lease-max=256 --conf-file= --domain=openstacklocal

  # cat /var/lib/neutron/dhcp/c1d688da-a92e-4fc0-bdc5-d9361a8e15b6/host 
  fa:16:3e:88:f9:06,host-10-16-1-10.yo.,10.16.1.10
  fa:16:3e:b6:35:78,asd.yo.,10.16.1.12
  fa:16:3e:c7:4f:25,ctl-agw1.yo.,10.16.1.251
  fa:16:3e:ae:49:f6,vpn.yo.,10.16.1.11
  fa:16:3e:9a:73:bf,egw.yo.,10.16.1.1
  fa:16:3e:10:5f:0a,ctl-agw2.yo.,10.16.1.252
  fa:16:3e:e7:a5:f8,poi.yo.,10.16.1.21

  ALSO, in DHCP reply VM receives domain name "openstacklocal", which is
  in CLI args of dnsmasq (see above) and nowhere more. Pasted from VM:

  =========== VM cfg ==========
  # cat dhclient.eth0.leases
  lease {
    interface "eth0";
    ...
    option hostname "vpn";
    option domainname "openstacklocal";
  }

  # cat /etc/resolv.conf
  ...
  search openstacklocal
  =============================

  ENVIRONMENT:

  Ubuntu 16.04.1 LTS (Xenial Xerus)

  neutron-common                     2:9.0.0-0ubuntu1.16.10.2~cloud0
  neutron-dhcp-agent                 2:9.0.0-0ubuntu1.16.10.2~cloud0
  neutron-l3-agent                   2:9.0.0-0ubuntu1.16.10.2~cloud0
  neutron-linuxbridge-agent          2:9.0.0-0ubuntu1.16.10.2~cloud0
  neutron-metadata-agent             2:9.0.0-0ubuntu1.16.10.2~cloud0
  neutron-plugin-ml2                 2:9.0.0-0ubuntu1.16.10.2~cloud0
  neutron-server                     2:9.0.0-0ubuntu1.16.10.2~cloud0

  Thank you.

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


References