xenial64 image (20160907.1.0) has a broken (empty) /etc/resolv.conf

Bug #1621393 reported by Marius Gedminas on 2016-09-08
124
This bug affects 21 people
Affects Status Importance Assigned to Milestone
cloud-images
Undecided
Unassigned
livecd-rootfs (Ubuntu)
High
Unassigned
Nominated for Trusty by Robert C Jennings
Xenial
High
Unassigned

Bug Description

[SRU Justification]
This is a regression introduced in the previous SRU of livecd-rootfs.

[Test case]
1. vagrant init ubuntu/xenial64
2. vagrant up
3. vagrant ssh
4. ping google.com

Expected result:
- ping succeeds

Actual result:
- name resolution fails

Inspecting closely reveals that this image has a 0-length /etc/resolv.conf. Replacing it with a symlink to /run/resolvconf/resolv.conf fixes things.

description: updated
Poma (semenov-roman) wrote :

Also /etc/resolv.conf doesn't have a root write permission which is probably the root cause of this problem

Poma (semenov-roman) wrote :

By the way this bug affects only the latest 20160907 box image

Louis Zuckerman (semiosis) wrote :

I've identified the problem and have a fix for it. I'll try to review with the ubuntu cloud images people tomorrow morning. If all goes well I'll submit a patch over the weekend.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in livecd-rootfs (Ubuntu):
status: New → Confirmed
GGeorg (georg-ubuntu-com) wrote :

Hi,

in the meanwhile you can use this Workaround in Vagrantfile (multimachine example):

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
     servers.each do |machine|
          config.vm.define machine["hostname"] do |node|
               node.vm.provision "shell", inline: "ln -nsf ../run/resolvconf/resolv.conf /etc/resolv.conf", privileged: true, name: "FIX RESOLV.CONF"
          end
     end
end

Steve Langasek (vorlon) on 2016-09-09
tags: added: regression-update
Steve Langasek (vorlon) on 2016-09-10
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.430

---------------
livecd-rootfs (2.430) yakkety; urgency=medium

  [ Michael Vogt ]
  * live-build/ubuntu-core/hooks/01-setup_user.chroot:
    - do not create "ubuntu" user for ubuntu-core anymore, the
      console-conf package will create this user now
  * live-build/ubuntu-core/hooks/02-add_user_to_groups.chroot
    - dropped

  [ Steve Langasek ]
  * live-build/ubuntu-cpc/hooks/042-vagrant.binary: fix unmount handling
    so that the teardown is done properly /before/ we try to make an
    image from our filesystem, since otherwise /etc/resolv.conf is broken.
    LP: #1621393.

 -- Steve Langasek <email address hidden> Fri, 09 Sep 2016 15:57:27 -0700

Changed in livecd-rootfs (Ubuntu):
status: Confirmed → Fix Released
Louis Zuckerman (semiosis) wrote :

Thank you Steve Langasek!

Thomas (thomasbilk) wrote :

I still have the exact same issue with the latest 64bit box version (20160909.0.0) and vagrant version 1.8.5.

Thomas (thomasbilk) wrote :

It also does not seem to work with the last few box versions. When will the box be updated?

Hello Marius, or anyone else affected,

Accepted livecd-rootfs into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.408.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in livecd-rootfs (Ubuntu Xenial):
importance: Undecided → High
status: New → Triaged
status: Triaged → Fix Committed
tags: added: verification-needed
Louis Zuckerman (semiosis) wrote :

I tested this in the same manner as the previous SRU (LP: #1605795), and additionally verifying that /etc/resolv.conf is a symlink to ../run/resolvconf/resolv.conf. It all looks good to me. Tested version 2.408.4 from xenial-proposed.

tags: added: verification-done
removed: verification-needed
Changed in livecd-rootfs (Ubuntu):
importance: Undecided → High
Louis Zuckerman (semiosis) wrote :

I also tested a build done by Dan Watkins on the ubuntu build infrastructure and it looks good as well.

Louis Zuckerman (semiosis) wrote :

If anyone else could test this build by Dan Watkins and check for regressions that would be great.

https://i284108973.restricted.launchpadlibrarian.net/284108973/livecd.ubuntu-cpc.vagrant.box?token=K7Pp7BgzNCZ0b0BbvC3q3Vgc3LkJpwW0

Thomas (thomasbilk) wrote :

I just tested the image provided by the link (https://i284108973.restricted.launchpadlibrarian.net/284108973/livecd.ubuntu-cpc.vagrant.box?token=K7Pp7BgzNCZ0b0BbvC3q3Vgc3LkJpwW0) and can confirm that the described problem seems to be resolved. Thank you.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.408.4

---------------
livecd-rootfs (2.408.4) xenial; urgency=medium

  * live-build/ubuntu-cpc/hooks/042-vagrant.binary: fix unmount handling
    so that the teardown is done properly /before/ we try to make an
    image from our filesystem, since otherwise /etc/resolv.conf is broken.
    LP: #1621393.

 -- Steve Langasek <email address hidden> Fri, 09 Sep 2016 17:04:54 -0700

Changed in livecd-rootfs (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for livecd-rootfs has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Thomas (thomasbilk) wrote :

So I just tested again with the released image on Vagrant Atlas (https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160914.0.0) and the image from Ubuntu Cloud Images (https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box) and the bug still remains. So the `/etc/resolv.conf` file is empty and no hosts can be resolved and thus not reached.

Poma (semenov-roman) wrote :

This image was made 3 hours ago while bug fix was released only 1 hour ago. Is there a way to trigger image build again?

Official Ubuntu Vagrant Box image:

https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box

Still not working.

There is any update on this?

Louis Zuckerman (semiosis) wrote :

The fix is released in livecd-rootfs 2.408.4 which is in xenial-updates. The only thing left is to get that package updated on the cloud image build servers. I am trying to find someone on IRC who can help with that.

blackpingus (raffaele) wrote :

Using v20160921.0.0 and it works :)

Poma (semenov-roman) wrote :

Yay! 5 months after 16.04 release it started to work in Vagrant.

Changed in cloud-images:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers