/etc/resolv.conf is not updated

Bug #1480263 reported by Nobuto Murata
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-deployer
Fix Released
Medium
Nobuto Murata

Bug Description

After the deployment, /etc/network/interfaces has "dns-nameserver 127.0.0.1". However /etc/resolv.conf(/run/resolvconf/resolv.conf) still has old entries, i.e. name resolution of MAAS nodes does not work.

[vmaas/templates/config-maas.sh]
...
     14 # Configure the dns nameservers
     15 echo "Configuring the DNS nameserver"
     16 for dev in `ip link show | grep eth.*mtu | cut -d':' -f2`; do
     17 sudo resolvconf -d $dev
     18 done
     19
     20 sudo sed -i 's/dns-nameserver.*/dns-nameserver 127.0.0.1/g' /etc/network/interfaces
     21 sudo resolvconf -u
...

I belivieve the pair of "resolvconf -d eth0.inet && resolvconf -a eth0.inet" is needed to update /etc/resolv.conf properly.

Tags: cpec

Related branches

Revision history for this message
Nobuto Murata (nobuto) wrote :

A quick workaround is `sudo ifdown eth0 && sudo ifup eth0` or just reboot.

Nobuto Murata (nobuto)
tags: added: cpec
Changed in maas-deployer:
importance: Undecided → Medium
milestone: none → 0.0.2
Nobuto Murata (nobuto)
Changed in maas-deployer:
assignee: nobody → Nobuto Murata (nobuto)
status: New → In Progress
Changed in maas-deployer:
status: In Progress → Fix Committed
Revision history for this message
Edward Hope-Morley (hopem) wrote :

This change is breaking deployments. Specifically it prevents MAAS from being able to download images since it is unable to resolve maas.ubuntu.com once the original nameserver is removed.

There is also possibly a bug with how we are using the local datasource with cloud-init to configure networking since on reboot /e/n/i is always overwritten with the contents of the metadata section in the local datasource. We will also need a more intelligent way to work out what nameservers are configured and on what interface(s) and apply then accordingly with e.g.

echo "nameserver 127.0.0.1"| sudo resolvconf -a eth0.inet

So, i'm going to revert this for now until we find a better solution.

Changed in maas-deployer:
milestone: 0.0.2 → none
Revision history for this message
Edward Hope-Morley (hopem) wrote :

After some discussion with wolsen i think we can get this fixed up for 0.0.2. Will submit an additional patch shortly.

Changed in maas-deployer:
milestone: none → 0.0.2
status: Fix Committed → In Progress
Changed in maas-deployer:
status: In Progress → Fix Committed
Changed in maas-deployer:
status: Fix Committed → Fix Released
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.