Cloud image doesn't call resolvconf but writes a file at /etc/resolv.conf, causing resolvconf to complain

Bug #1003595 reported by K. Deniz Ogut
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
UEC Live Build
Fix Released
Undecided
Unassigned

Bug Description

Three days ago I lauched an EC2 Ubuntu Precise micro instance on Amazon Web Service. AMI: ubuntu/images/ebs/ubuntu-precise-12.04-i386-server-20120424 (ami-e7e8d393)

This is my very first server experience so I'm going slow and reading and observing the system. During this three days I didn't install any new packages other than appyling four batches of updates. Some of them were security updates, some were not; some were kernel updates, some were not. My var/log/apt/history.log is attached.

As a result:

# uname -a
Linux [some-internal-IP] 3.2.0-24-virtual #38-Ubuntu SMP Tue May 1 17:00:51 UTC 2012 i686 i686 i386 GNU/Linux

If it might be useful:

# ls -l /etc/resolv.conf
-r--r--r-- 1 root root 91 May 23 09:59 /etc/resolv.conf

# cat /etc/resolv.conf
domain eu-west-1.compute.internal
search eu-west-1.compute.internal
nameserver 172.16.0.23

I didn't do any configuration to the default system of any kind by myself. Up till now I just play with the basic commands such as whoami, top, ls, cd etc. and to observe the update/upgrade processes.

As you can see from the attached file, my fourh and last upgrade is from resolvconf 1.63ubuntu11 to resolvconf 1.63ubuntu14 and the upgrade resulted with the error: "resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything." What I get from connection up to that error is attached.

I searched some on the Web and figured out that issues having something to do with the error "/etc/resolv.conf isn't a symlink, not doing anything" is being experienced for Ubuntu for years. The causes for all of them might not be the same but seems thet have to have something in common. I'm not an expert on such things. Some places on the Web for such discussions: http://ubuntuforums.org/showthread.php?t=1193585 , http://askubuntu.com/questions/137037/network-manager-not-populating-resolv-conf , http://eric-b.net/?p=71 . There are discussions on Lauchpad as well: Bug #922677 is an example. Bug #324233 (with 3 duplicates) sounds more alarming with what Thomas Hood (jdthood) wrote on 2011-12-03 at the end of his long comment with a patch: "Who am I? I am one of the maintainers of resolvconf in Debian. I would prefer to leave this work up to Ubuntu folks, but these issues have been left unresolved for years. Something has to be done."

On a server installation such as EC2, with no extra package installed other than offical updates, with no personal configuration -all being the defaults- a bug known for years, for such a critical component for a server -again- surfaces up. Does it make sense?

I'm not adding any more files, not adding the files the original reporter had attched as well because I don't know what you need. If you'll ask me for more files outputs, I can send them.

I don't suppose so but if this a very interesting, atypical situation calling for deep investigation, I can give the control of the EC2 instance for some time to a friend with reputation dealing with such issues. The instance is free of charge for 1 year and includes nothing except its default being. I can terminate it and launch a new one any time.

Until I hear something from you here, I won't do anything, any update or so to that system for 2-3 days. ıf I can not hear something soon maybe I'll terminate it and can't answer probable questions anymore.

Regards.

PS: On the system in question, I can already view Web pages via w3m, if it means something in some way.

Revision history for this message
K. Deniz Ogut (kdenizogut) wrote :
Revision history for this message
K. Deniz Ogut (kdenizogut) wrote :
Revision history for this message
Stéphane Graber (stgraber) wrote :

It's not a bug, resolvconf is just letting you know that it won't update the file as it's not a symlink, nothing wrong there.
I might agree that showing "Error" might be a bit excessive and that we might want to replace that by "Warning".

The problem, if we can consider it to be one is that one of the cloud image tools is replacing the /etc/resolv.conf symlink by a static file instead of updating /etc/network/interface with the DNS information. That's certainly allowed and is the right way of disabling resolvconf, but I don't think it's a good idea for the official Ubuntu images to do that, we should instead make sure the cloud scripts use the right resolvconf hook to provide their configuration.

Changed in ubuntu-on-ec2:
status: New → Invalid
Changed in connman:
status: New → Invalid
Revision history for this message
Stéphane Graber (stgraber) wrote :

Per discussion on IRC having /etc/resolv.conf be a static file instead of a symlink to ../run/resolvconf/resolv.conf is wrong and is likely a leftover from an earlier workaround. This isn't a resolvconf bug.

Moving the bug against Ubuntu itself and assigning it to Ben Howard to fix the cloud images build scripts.

affects: resolvconf (Ubuntu) → ubuntu
Changed in ubuntu:
assignee: nobody → Ben Howard (utlemming)
Scott Moser (smoser)
tags: added: cloud-images ec2-images
tags: added: cloud-image-build
Scott Moser (smoser)
tags: added: cloud-images-build
removed: cloud-image-build
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Should be fixed EOD. Currently testing a build with this fixed.

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Confirmed that the 20120528.1 daily build of precise has /etc/resolv.conf as a symlink.

Once changelogs.ubuntu.com is back, I will be releasing a new AMI of Precise with this fix in place.

Thomas Hood (jdthood)
summary: - resolvconf 1.63ubuntu14 upgrade error: /etc/resolv.conf isn't a symlink,
- not doing anything
+ Cloud image lacks /etc/resolv.conf symlink, causes resolvconf to
+ complain
Changed in ubuntu:
status: New → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Re: Cloud image lacks /etc/resolv.conf symlink, causes resolvconf to complain
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Scott,

The fix was in too places:
http://bazaar.launchpad.net/~ubuntu-on-ec2/live-build/cloud-images/revision/1848
http://bazaar.launchpad.net/~ubuntu-on-ec2/vmbuilder/automated-ec2-builds/revision/477

I've confirmed the fix in the daily images for Precise and Quantal. Marking as fix released.

Changed in ubuntu:
status: Fix Committed → Fix Released
Revision history for this message
Thomas Hood (jdthood) wrote :

There are typos in those patches affecting functional correctness.

http://bazaar.launchpad.net/~ubuntu-on-ec2/vmbuilder/automated-ec2-builds/view/head:/live-config/common/hooks/099-cleanup.chroot
> rm /etc/resolvconf/resolv.conf.d/original || echo "Unable to remove resolve.conf aritifacts"
> rm /etc/resolvconf/resolv.conf.d/tail || echo "Unable to remove resolve.conf aritifacts"

It's "resolvconf" or "resolv.conf" (depending on what you want to say), not "resolve.conf".

http://bazaar.launchpad.net/~ubuntu-on-ec2/live-build/cloud-images/view/head:/scripts/build/lb_chroot_resolv
> rm chroot/etc/resolvconf/resolvconf.d/original || true
> rm chroot/etc/resolvconf/resolvconf.d/tail || true
[...]
> cp -a config/includes.chroot/etc/resolv.conf chroot/etc/resolvconf/resolvconf.d/original

It's "/etc/resolvconf/resolv.conf.d", not "/etc/resolvconf/resolvconf.d".

Typos seem still to be present in the code at HEAD.

Changed in ubuntu-on-ec2:
status: Invalid → New
Thomas Hood (jdthood)
summary: - Cloud image lacks /etc/resolv.conf symlink, causes resolvconf to
- complain
+ Cloud image doesn't call resolvconf but writes a file at
+ /etc/resolv.conf, causing resolvconf to complain
affects: connman → resolvconf (Ubuntu)
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote : Re: [Bug 1003595] Re: Cloud image lacks /etc/resolv.conf symlink, causes resolvconf to complain

Fixed typos for console message.

=== modified file 'live-config/common/hooks/099-cleanup.chroot'
--- live-config/common/hooks/099-cleanup.chroot 2012-05-28 18:50:50 +0000
+++ live-config/common/hooks/099-cleanup.chroot 2012-06-20 03:00:48 +0000
@@ -9,7 +9,7 @@
 rm /etc/group- || echo "No spare group file to clenaup"
 rm -f /etc/apt/conf.d/00secure || echo "No apt cache to cleanup"
 rm /etc/popularity-contest.conf || echo "No popularity-contest.conf
to remove"
-rm /etc/resolvconf/resolv.conf.d/original || echo "Unable to remove
resolve.conf aritifacts"
-rm /etc/resolvconf/resolv.conf.d/tail || echo "Unable to remove
resolve.conf aritifacts"
+rm /etc/resolvconf/resolv.conf.d/original || echo "Unable to remove
resolv.conf artifacts"
+rm /etc/resolvconf/resolv.conf.d/tail || echo "Unable to remove
resolv.conf artifacts"

 exit 0

ben@padfoot:/work/automated-ec2

Revision history for this message
Thomas Hood (jdthood) wrote :

Great. But did you notice the other error?

http://bazaar.launchpad.net/~ubuntu-on-ec2/live-build/cloud-images/view/head:/scripts/build/lb_chroot_resolv
> rm chroot/etc/resolvconf/resolvconf.d/original || true
> rm chroot/etc/resolvconf/resolvconf.d/tail || true
[...]
> cp -a config/includes.chroot/etc/resolv.conf chroot/etc/resolvconf/resolvconf.d/original

It's "/etc/resolvconf/resolv.conf.d", not "/etc/resolvconf/resolvconf.d". There are three instances of this typo.

Revision history for this message
K. Deniz Ogut (kdenizogut) wrote :

Sorry but its me -the original reporter- again: Today, after a long vacation I updated my ami to 3.2.0-29-virtual and I stil get the same thing: "resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything."

Its not very easy for me to follow all the seperate steps in this bug: I see a "fix released" tag for Ubuntu and its still "new" for Ubuntu on EC2. As a result, is everything OK and is that all what has to be done, or...?

Scott Moser (smoser)
no longer affects: ubuntu-on-ec2
Revision history for this message
Thomas Hood (jdthood) wrote :

@K. Deniz Ogut: To fix the problem do either

    dpkg-reconfigure resolvconf

and elect to create the symbolic link at /etc/resolv.conf, or do

    sudo ln -nsf ../run/resolvconf/resolv.conf /etc/resolv.conf
    sudo /sbin/resolvconf --enable-updates

Then reboot. If you don't want to reboot then, in each case with the appropriate means: stop local nameservers; deconfigure all network interfaces; configure network interfaces; start local nameservers.

Revision history for this message
Scott Moser (smoser) wrote :

K.,
 Hi. Unfortunately, the bug was in the build process, and was *fixed* in the build process.
 new released images of precise (current is 20120728) [1] have the link fixed.

 To "fix", then you have 2 options:
a.) start from scratch on a newer released image
b.) update the current system. I just tested the following and it seems to work for me:

     sudo rm -f /etc/resolv.conf /etc/resolvconf/resolv.conf.d/original /etc/resolvconf/resolv.conf.d/tail &&
          sudo ln -sf ../run/resolvconf/resolv.conf /etc/resolv.conf
     sudo reboot

 I removed the "Ubuntu on Ec2" task as that project is no longer really valid. Bugs found when running Ubuntu on EC2 are now just normal Ubuntu bugs.

--
[1] http://cloud-images.ubuntu.com/releases/precise/release/

Revision history for this message
Jason Dusek (solidsnack) wrote :

I believe this bug has resurfaced in ami-e1e8d395

Revision history for this message
Thomas Hood (jdthood) wrote :

Does the fix from comment #13 work?

Mathew Hodson (mhodson)
no longer affects: resolvconf (Ubuntu)
affects: ubuntu → cloud-images
Mathew Hodson (mhodson)
affects: cloud-images → uec-live-build
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.