Public bug reported:

Using MAAS 2.3, during commissioning (and likely in the rest of the
ephemeral environment) we have noticed that resolv.conf is not set with
the DNS server.

That said, during the commissioning process, MAAS does not send any
metadata to cloud-init to configure the network, rather, we expect the
image to boot from the network via DHCP. So, cloud-init writes:

ubuntu@manual:~$ cat /etc/network/interfaces.d/50-cloud-init.cfg
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback

# control-manual ens3
iface ens3 inet dhcp
    broadcast 192.168.122.255
    dns-nameservers 192.168.122.2
    gateway 192.168.122.1
    netmask 255.255.255.0

Which correctly includes the DNS server. However:

ubuntu@manual:~$ ping google.com
ping: unknown host google.com

If restart the interfacE:

ubuntu@manual:~$ sudo ifdown ens3 && sudo ifup ens3
ifdown: interface ens3 not configured
Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/ens3/52:54:00:ea:57:31
Sending on   LPF/ens3/52:54:00:ea:57:31
Sending on   Socket/fallback
DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 3 (xid=0x14eb0354)
DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 4 (xid=0x14eb0354)
DHCPREQUEST of 192.168.122.195 on ens3 to 255.255.255.255 port 67 
(xid=0x5403eb14)
DHCPOFFER of 192.168.122.195 from 192.168.122.2
DHCPACK of 192.168.122.195 from 192.168.122.2
Restarting ntp (via systemctl): ntp.service.
bound to 192.168.122.195 -- renewal in 290 seconds.

ubuntu@manual:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.122.2
search maas

ubuntu@manual:~$ ping google.com
PING google.com (216.58.192.46) 56(84) bytes of data.
64 bytes from mia07s46-in-f14.1e100.net (216.58.192.46): icmp_seq=1 ttl=52 
time=7.47 ms
^C
--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 7.472/7.472/7.472/0.000 ms

As such, this either seems like a bug in Ubuntu, or caused by cloud-init
when writing e/n/i.d/50-cloud-init.cfg

ubuntu@manual:~$ dpkg -l | grep cloud-init
ii  cloud-init                       0.7.9-153-g16a7302f-0ubuntu1~16.04.2       
all          Init scripts for cloud instances
ii  cloud-initramfs-copymods         0.27ubuntu1.4                              
all          copy initramfs modules into root filesystem for later use
ii  cloud-initramfs-dyn-netconf      0.27ubuntu1.4                              
all          write a network interface file in /run for BOOTIF

ubuntu@manual:~$ uname -a
Linux manual 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux
ubuntu@manual:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

ubuntu@manual:~$ pastebinit /var/log/cloud-init.log 
http://paste.ubuntu.com/25342738/
ubuntu@manual:~$ pastebinit /var/log/cloud-init-output.log 
http://paste.ubuntu.com/25342740/

** Affects: maas
     Importance: Undecided
         Status: New

** Affects: cloud-init (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: cloud-init (Ubuntu)
   Importance: Undecided
       Status: New

** Description changed:

  Using MAAS 2.3, during commissioning (and likely in the rest of the
  ephemeral environment) we have noticed that resolv.conf is not set with
  the DNS server.
  
  That said, during the commissioning process, MAAS does not send any
  metadata to cloud-init to configure the network, rather, we expect the
  image to boot from the network via DHCP. So, cloud-init writes:
  
- ubuntu@manual:~$ cat /etc/network/interfaces.d/50-cloud-init.cfg 
+ ubuntu@manual:~$ cat /etc/network/interfaces.d/50-cloud-init.cfg
  # This file is generated from information provided by
  # the datasource.  Changes to it will not persist across an instance.
  # To disable cloud-init's network configuration capabilities, write a file
  # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  # network: {config: disabled}
  auto lo
  iface lo inet loopback
  
  # control-manual ens3
  iface ens3 inet dhcp
-     broadcast 192.168.122.255
-     dns-nameservers 192.168.122.2
-     gateway 192.168.122.1
-     netmask 255.255.255.0
+     broadcast 192.168.122.255
+     dns-nameservers 192.168.122.2
+     gateway 192.168.122.1
+     netmask 255.255.255.0
  
  Which correctly includes the DNS server. However:
  
  ubuntu@manual:~$ ping google.com
  ping: unknown host google.com
  
  If restart the interfacE:
  
  ubuntu@manual:~$ sudo ifdown ens3 && sudo ifup ens3
  ifdown: interface ens3 not configured
  Internet Systems Consortium DHCP Client 4.3.3
  Copyright 2004-2015 Internet Systems Consortium.
  All rights reserved.
  For info, please visit https://www.isc.org/software/dhcp/
  
  Listening on LPF/ens3/52:54:00:ea:57:31
  Sending on   LPF/ens3/52:54:00:ea:57:31
  Sending on   Socket/fallback
  DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 3 (xid=0x14eb0354)
  DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 4 (xid=0x14eb0354)
  DHCPREQUEST of 192.168.122.195 on ens3 to 255.255.255.255 port 67 
(xid=0x5403eb14)
  DHCPOFFER of 192.168.122.195 from 192.168.122.2
  DHCPACK of 192.168.122.195 from 192.168.122.2
  Restarting ntp (via systemctl): ntp.service.
  bound to 192.168.122.195 -- renewal in 290 seconds.
  
- ubuntu@manual:~$ cat /etc/resolv.conf 
+ ubuntu@manual:~$ cat /etc/resolv.conf
  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  nameserver 192.168.122.2
  search maas
  
  ubuntu@manual:~$ ping google.com
  PING google.com (216.58.192.46) 56(84) bytes of data.
  64 bytes from mia07s46-in-f14.1e100.net (216.58.192.46): icmp_seq=1 ttl=52 
time=7.47 ms
  ^C
  --- google.com ping statistics ---
  1 packets transmitted, 1 received, 0% packet loss, time 0ms
  rtt min/avg/max/mdev = 7.472/7.472/7.472/0.000 ms
  
+ As such, this either seems like a bug in Ubuntu, or caused by cloud-init
+ when writing e/n/i.d/50-cloud-init.cfg
  
- As such, this either seems like a bug in Ubuntu, or caused by cloud-init when 
writing e/n/i.d/50-cloud-init.cfg
+ 
+ ubuntu@manual:~$ dpkg -l | grep cloud-init
+ ii  cloud-init                       0.7.9-153-g16a7302f-0ubuntu1~16.04.2     
  all          Init scripts for cloud instances
+ ii  cloud-initramfs-copymods         0.27ubuntu1.4                            
  all          copy initramfs modules into root filesystem for later use
+ ii  cloud-initramfs-dyn-netconf      0.27ubuntu1.4                            
  all          write a network interface file in /run for BOOTIF

** Description changed:

  Using MAAS 2.3, during commissioning (and likely in the rest of the
  ephemeral environment) we have noticed that resolv.conf is not set with
  the DNS server.
  
  That said, during the commissioning process, MAAS does not send any
  metadata to cloud-init to configure the network, rather, we expect the
  image to boot from the network via DHCP. So, cloud-init writes:
  
  ubuntu@manual:~$ cat /etc/network/interfaces.d/50-cloud-init.cfg
  # This file is generated from information provided by
  # the datasource.  Changes to it will not persist across an instance.
  # To disable cloud-init's network configuration capabilities, write a file
  # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  # network: {config: disabled}
  auto lo
  iface lo inet loopback
  
  # control-manual ens3
  iface ens3 inet dhcp
      broadcast 192.168.122.255
      dns-nameservers 192.168.122.2
      gateway 192.168.122.1
      netmask 255.255.255.0
  
  Which correctly includes the DNS server. However:
  
  ubuntu@manual:~$ ping google.com
  ping: unknown host google.com
  
  If restart the interfacE:
  
  ubuntu@manual:~$ sudo ifdown ens3 && sudo ifup ens3
  ifdown: interface ens3 not configured
  Internet Systems Consortium DHCP Client 4.3.3
  Copyright 2004-2015 Internet Systems Consortium.
  All rights reserved.
  For info, please visit https://www.isc.org/software/dhcp/
  
  Listening on LPF/ens3/52:54:00:ea:57:31
  Sending on   LPF/ens3/52:54:00:ea:57:31
  Sending on   Socket/fallback
  DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 3 (xid=0x14eb0354)
  DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 4 (xid=0x14eb0354)
  DHCPREQUEST of 192.168.122.195 on ens3 to 255.255.255.255 port 67 
(xid=0x5403eb14)
  DHCPOFFER of 192.168.122.195 from 192.168.122.2
  DHCPACK of 192.168.122.195 from 192.168.122.2
  Restarting ntp (via systemctl): ntp.service.
  bound to 192.168.122.195 -- renewal in 290 seconds.
  
  ubuntu@manual:~$ cat /etc/resolv.conf
  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  nameserver 192.168.122.2
  search maas
  
  ubuntu@manual:~$ ping google.com
  PING google.com (216.58.192.46) 56(84) bytes of data.
  64 bytes from mia07s46-in-f14.1e100.net (216.58.192.46): icmp_seq=1 ttl=52 
time=7.47 ms
  ^C
  --- google.com ping statistics ---
  1 packets transmitted, 1 received, 0% packet loss, time 0ms
  rtt min/avg/max/mdev = 7.472/7.472/7.472/0.000 ms
  
  As such, this either seems like a bug in Ubuntu, or caused by cloud-init
  when writing e/n/i.d/50-cloud-init.cfg
  
- 
  ubuntu@manual:~$ dpkg -l | grep cloud-init
  ii  cloud-init                       0.7.9-153-g16a7302f-0ubuntu1~16.04.2     
  all          Init scripts for cloud instances
  ii  cloud-initramfs-copymods         0.27ubuntu1.4                            
  all          copy initramfs modules into root filesystem for later use
  ii  cloud-initramfs-dyn-netconf      0.27ubuntu1.4                            
  all          write a network interface file in /run for BOOTIF
+ 
+ ubuntu@manual:~$ uname -a
+ Linux manual 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux
+ ubuntu@manual:~$ lsb_release -a
+ No LSB modules are available.
+ Distributor ID: Ubuntu
+ Description:    Ubuntu 16.04.3 LTS
+ Release:        16.04
+ Codename:       xenial
+ 
+ ubuntu@manual:~$ pastebinit /var/log/cloud-init.log 
+ http://paste.ubuntu.com/25342738/
+ ubuntu@manual:~$ pastebinit /var/log/cloud-init-output.log 
+ http://paste.ubuntu.com/25342740/

** Also affects: isc-dhcp (Ubuntu)
   Importance: Undecided
       Status: New

** No longer affects: isc-dhcp (Ubuntu)

** Changed in: maas
    Milestone: None => 2.3.0

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1711760

Title:
  [2.3] resolv.conf is not set (during commissioning)

Status in MAAS:
  New
Status in cloud-init package in Ubuntu:
  New

Bug description:
  Using MAAS 2.3, during commissioning (and likely in the rest of the
  ephemeral environment) we have noticed that resolv.conf is not set
  with the DNS server.

  That said, during the commissioning process, MAAS does not send any
  metadata to cloud-init to configure the network, rather, we expect the
  image to boot from the network via DHCP. So, cloud-init writes:

  ubuntu@manual:~$ cat /etc/network/interfaces.d/50-cloud-init.cfg
  # This file is generated from information provided by
  # the datasource.  Changes to it will not persist across an instance.
  # To disable cloud-init's network configuration capabilities, write a file
  # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  # network: {config: disabled}
  auto lo
  iface lo inet loopback

  # control-manual ens3
  iface ens3 inet dhcp
      broadcast 192.168.122.255
      dns-nameservers 192.168.122.2
      gateway 192.168.122.1
      netmask 255.255.255.0

  Which correctly includes the DNS server. However:

  ubuntu@manual:~$ ping google.com
  ping: unknown host google.com

  If restart the interfacE:

  ubuntu@manual:~$ sudo ifdown ens3 && sudo ifup ens3
  ifdown: interface ens3 not configured
  Internet Systems Consortium DHCP Client 4.3.3
  Copyright 2004-2015 Internet Systems Consortium.
  All rights reserved.
  For info, please visit https://www.isc.org/software/dhcp/

  Listening on LPF/ens3/52:54:00:ea:57:31
  Sending on   LPF/ens3/52:54:00:ea:57:31
  Sending on   Socket/fallback
  DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 3 (xid=0x14eb0354)
  DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 4 (xid=0x14eb0354)
  DHCPREQUEST of 192.168.122.195 on ens3 to 255.255.255.255 port 67 
(xid=0x5403eb14)
  DHCPOFFER of 192.168.122.195 from 192.168.122.2
  DHCPACK of 192.168.122.195 from 192.168.122.2
  Restarting ntp (via systemctl): ntp.service.
  bound to 192.168.122.195 -- renewal in 290 seconds.

  ubuntu@manual:~$ cat /etc/resolv.conf
  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  nameserver 192.168.122.2
  search maas

  ubuntu@manual:~$ ping google.com
  PING google.com (216.58.192.46) 56(84) bytes of data.
  64 bytes from mia07s46-in-f14.1e100.net (216.58.192.46): icmp_seq=1 ttl=52 
time=7.47 ms
  ^C
  --- google.com ping statistics ---
  1 packets transmitted, 1 received, 0% packet loss, time 0ms
  rtt min/avg/max/mdev = 7.472/7.472/7.472/0.000 ms

  As such, this either seems like a bug in Ubuntu, or caused by cloud-
  init when writing e/n/i.d/50-cloud-init.cfg

  ubuntu@manual:~$ dpkg -l | grep cloud-init
  ii  cloud-init                       0.7.9-153-g16a7302f-0ubuntu1~16.04.2     
  all          Init scripts for cloud instances
  ii  cloud-initramfs-copymods         0.27ubuntu1.4                            
  all          copy initramfs modules into root filesystem for later use
  ii  cloud-initramfs-dyn-netconf      0.27ubuntu1.4                            
  all          write a network interface file in /run for BOOTIF

  ubuntu@manual:~$ uname -a
  Linux manual 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux
  ubuntu@manual:~$ lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 16.04.3 LTS
  Release:        16.04
  Codename:       xenial

  ubuntu@manual:~$ pastebinit /var/log/cloud-init.log 
  http://paste.ubuntu.com/25342738/
  ubuntu@manual:~$ pastebinit /var/log/cloud-init-output.log 
  http://paste.ubuntu.com/25342740/

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to