← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1771885] Re: bionic: lxd containers missing search domain in systemd-resolve configuration

 

Discussion with roaksoax about this and it seems likely this is a cloud-
int / netplan problem. I have added cloud-init and maas just to be
thorough.

When bionic is deployed using MAAS 2.3.0 using a static network config
the DNS search domain is missing from the netplan configuration and or
systemd-resolve.

I am attaching three sets of data. bionic-maas, bionic-dhcp and xenial-
maas to show the differences.

Cloud init reports in cloud-init.log it has the information. See search
bellow:

config= {
'config':
    [{'id': 'eno1', 'mac_address': 'd4:be:d9:a8:44:ff', 'mtu': 1500, 'name': 'eno1', 'subnets': [{'address': '10.245.168.26/21', 'dns_nameservers': ['10.245.168.6'], 'gateway': '10.245.168.1', 'type': 'static'}], 'type': 'physical'},
     {'id': 'eno2', 'mac_address': 'd4:be:d9:a8:45:01', 'mtu': 1500, 'name': 'eno2', 'subnets': [{'type': 'manual'}], 'type': 'physical'},
     {'id': 'eno3', 'mac_address': 'd4:be:d9:a8:45:03', 'mtu': 1500, 'name': 'eno3', 'subnets': [{'type': 'manual'}], 'type': 'physical'},
     {'id': 'eno4', 'mac_address': 'd4:be:d9:a8:45:05', 'mtu': 1500, 'name': 'eno4', 'subnets': [{'type': 'manual'}], 'type': 'physical'},
     {'address': ['10.245.168.6'], 'search': ['maas'], 'type': 'nameserver'}],
'version': 1}

But the /etc/netplan/50-cloud-init.yaml configuration is missing this
information leading to resolution failures.

By contrast the xenial (/etc/network/interfaces.d/50-cloud-init.conf has
the correct information when the logging shows the same input from MAAS.

See also the bionci DHCP example which gets the search domain
information from DCHP.

** Also affects: cloud-init
   Importance: Undecided
       Status: New

** Also affects: maas
   Importance: Undecided
       Status: New

** Summary changed:

- bionic: lxd containers missing search domain in systemd-resolve configuration
+ bionic: manual maas missing search domain in systemd-resolve configuration

** Summary changed:

- bionic: manual maas missing search domain in systemd-resolve configuration
+ bionic: static maas missing search domain in systemd-resolve configuration

** Attachment added: "bionic-maas.tar.gz"
   https://bugs.launchpad.net/maas/+bug/1771885/+attachment/5146674/+files/bionic-maas.tar.gz

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

Title:
  bionic: static maas missing search domain in systemd-resolve
  configuration

Status in cloud-init:
  New
Status in juju:
  Fix Committed
Status in juju 2.3 series:
  Fix Released
Status in MAAS:
  New

Bug description:
  juju: 2.4-beta2  
  MAAS: 2.3.0

  Testing deployment of LXD containers on bionic (specifically for an
  openstack deployment) lead to this problem:

  https://bugs.launchpad.net/charm-nova-cloud-controller/+bug/1765405

  Summary:

  previously, the DNS config in the LXD containers were the same as the
  host machines

  now, the DNS config is in systemd, the DNS server is set correctly,
  but the search domain is missing, so hostnames won't resolve.

  Working resolv.conf on xenial lxd container:

  nameserver 10.245.168.6
  search maas

  Non-working "systemd-resolve --status":

  ...
  Link 21 (eth0)
        Current Scopes: DNS
         LLMNR setting: yes
  MulticastDNS setting: no
        DNSSEC setting: no
      DNSSEC supported: no
           DNS Servers: 10.245.168.6

  Working (now able to resolve hostnames after modifying netplan and
  adding search domain):

  Link 21 (eth0)
        Current Scopes: DNS
         LLMNR setting: yes
  MulticastDNS setting: no
        DNSSEC setting: no
      DNSSEC supported: no
           DNS Servers: 10.245.168.6
            DNS Domain: maas

  ubuntu@juju-6406ff-2-lxd-2:/etc$ host node-name
  node-name.maas has address 10.245.168.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1771885/+subscriptions