virt-customize enters infinite loop: dhclient-script: cannot open /etc/fstab

Bug #1632405 reported by Paul Graydon on 2016-10-11
56
This bug affects 10 people
Affects Status Importance Assigned to Milestone
libguestfs (Ubuntu)
Undecided
Unassigned
Xenial
Medium
Ioanna Alifieraki

Bug Description

When running virt-customize against an existing raw image, it seems to hang and do nothing. With verbose flag passed the logs are filled with:

/sbin/dhclient-script: 31: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 31: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 31: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 31: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 31: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 31: /sbin/dhclient-script: cannot open /etc/fstab: No such file

over and over again.

$ dpkg -l | grep guestfs
ii libguestfs-hfsplus:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - HFS+ support
ii libguestfs-perl 1:1.32.2-4ubuntu2 amd64 guest disk image management system - Perl bindings
ii libguestfs-reiserfs:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - ReiserFS support
ii libguestfs-rescue:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - virt-rescue enhancements
ii libguestfs-rsync:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - rsync support
ii libguestfs-tools 1:1.32.2-4ubuntu2 amd64 guest disk image management system - tools
ii libguestfs-xfs:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - XFS support
ii libguestfs0:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - shared library

$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

According to https://answers.launchpad.net/ubuntu/+source/libguestfs/+question/372927 this is fixed in 1.34, though I haven't verified this for myself.

******************SRU TEMPLATE******************
[Impact]

On Xenial libguestfs fails to configure network and gets into infinite loop,
because /etc/fstab file is not present which is required by dhclient-script.
Currently the libguestfs version for xenial is 1.32.2-4ubuntu2 which misses
the upstream commit [1] that solves the problem.

[Test Case]

$ lsb_release -rd
Description: Ubuntu 16.04.5 LTS
Release: 16.04

$ dpkg -l | grep guest
ii libguestfs-hfsplus:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - HFS+ support
ii libguestfs-perl 1:1.32.2-4ubuntu2 amd64 guest disk image management system - Perl bindings
ii libguestfs-reiserfs:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - ReiserFS support
ii libguestfs-tools 1:1.32.2-4ubuntu2 amd64 guest disk image management system - tools
ii libguestfs-xfs:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - XFS support
ii libguestfs0:amd64 1:1.32.2-4ubuntu2 amd64 guest disk image management system - shared library

$ sudo guestfish -a xenial-server-cloudimg-amd64-disk1.img --network -v << EOF
run
mount /dev/sda1 /
command 'apt update'
EOF
libguestfs: launch: program=guestfish
libguestfs: launch: version=1.32.2
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
....
[ 3.684953] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input2
/sbin/dhclient-script: 35: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 35: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 35: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 35: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 35: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 35: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 35: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
/sbin/dhclient-script: 35: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists

[Regression Potential]

This may impact libguestfs functionality when netwrok flag is enabled.

[Other Info]

Upstream commit : https://github.com/libguestfs/libguestfs/commit/fd60be95091a1923e108f72caf251f5549eeccd0

# git
git describe --contains fd60be9509
v1.33.43~10

# rmadison
 => libguestfs | 1:1.32.2-4ubuntu2 | xenial/universe | source
 libguestfs | 1:1.36.13-1ubuntu3 | bionic/universe | source
 libguestfs | 1:1.36.13-1ubuntu3.2 | bionic-updates/universe | source
 libguestfs | 1:1.38.4-1ubuntu2 | cosmic/universe | source
 libguestfs | 1:1.40.1-1ubuntu1 | disco/universe | source

CVE References

Launchpad Janitor (janitor) wrote :

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

Changed in libguestfs (Ubuntu):
status: New → Confirmed
David Klotz (ravenmokel) wrote :

I can confirm this makes virt-builder pretty much unusable for me in xenial. Maybe we should try to get 1.34 in xenial-backports? Or someone could build a PPA with the current version?

David Klotz (ravenmokel) wrote :

BTW, is there any workaround for 1.32, e.g. is there any way to manually create the "missing" /etc/fstab in the appliance (that's what its missing, right?)?

Richard Jones (rjones-redhat) wrote :

You could backport https://github.com/libguestfs/libguestfs/commit/fd60be95091a1923e108f72caf251f5549eeccd0

However note this is a bug in Ubuntu's dhclient-script package, and ultimately it should be fixed in Ubuntu.

Chris Puttick (cputtick) wrote :

Added bug for dhclient, probably badly, here: https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1650740 - anyone who wants to jump on and confirm it affects them very welcome

Mark Deneen (mdeneen) wrote :

This package is fairly broken in Ubuntu and a lot of features are simply unusable. It might be worth just going to 1.34.3, if that doesn't violate some Ubuntu contract.

Changed in libguestfs (Ubuntu Xenial):
assignee: nobody → Ioanna Alifieraki (joalif)
importance: Undecided → Medium
status: New → In Progress
description: updated
Ioanna Alifieraki (joalif) wrote :
Eric Desrochers (slashd) on 2019-02-07
description: updated
Eric Desrochers (slashd) on 2019-02-07
tags: added: sts
Eric Desrochers (slashd) wrote :

I have sponsored the patch.

It is now waiting for the SRU veriifcation team to approve the upload for the pkg to start building in xenial-proposed for the testing phase.

- Eric

The attachment "lp1632405_xenial.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch

Hello Paul, or anyone else affected,

Accepted libguestfs into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libguestfs/1:1.32.2-4ubuntu2.1 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 on 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libguestfs (Ubuntu):
status: Confirmed → Fix Released
Changed in libguestfs (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Łukasz Zemczak (sil2100) wrote :

Hello Paul, or anyone else affected,

Accepted libguestfs into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libguestfs/1:1.32.2-4ubuntu2.2 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 on 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Ioanna Alifieraki (joalif) wrote :
Download full text (3.3 KiB)

[VERIFICATION XENIAL]

Now configures network without a problem.

$ dpkg -l | grep libguestfs
ii libguestfs-hfsplus:amd64 1:1.32.2-4ubuntu2.2 amd64 guest disk image management system - HFS+ support
ii libguestfs-perl 1:1.32.2-4ubuntu2.2 amd64 guest disk image management system - Perl bindings
ii libguestfs-reiserfs:amd64 1:1.32.2-4ubuntu2.2 amd64 guest disk image management system - ReiserFS support
ii libguestfs-tools 1:1.32.2-4ubuntu2.2 amd64 guest disk image management system - tools
ii libguestfs-xfs:amd64 1:1.32.2-4ubuntu2.2 amd64 guest disk image management system - XFS support
ii libguestfs0:amd64 1:1.32.2-4ubuntu2.2 amd64 guest disk image management system - shared library

$ sudo guestfish -a xenial-server-cloudimg-amd64-disk1.img --network -v << EOF
> run
> mount /dev/sda1 /
> command 'apt update'
> EOF
libguestfs: launch: program=guestfish
libguestfs: launch: version=1.32.2
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
...
commandrvf: apt update
...
renaming /sysroot/etc/2j272z4v to /sysroot/etc/resolv.conf
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4354 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [912 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [728 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [301 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.6 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8440 B]
Get:14 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7280 B]
Get:15 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4456 B]
Get:16 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7804 B]
Get:17 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [4184 B]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [425 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [171 kB]
Get:20 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [5600 B]
Get:21 http://security.ubuntu.com/u...

Read more...

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Launchpad Janitor (janitor) wrote :
Download full text (31.7 KiB)

This bug was fixed in the package libguestfs - 1:1.32.2-4ubuntu2.2

---------------
libguestfs (1:1.32.2-4ubuntu2.2) xenial; urgency=medium

  * debian/control: Fix FTBFS on s390x (LP: #1816388)

libguestfs (1:1.32.2-4ubuntu2.1) xenial; urgency=medium

  * d/p/0006-appliance-touch-etc-fstab-when-enabling-the-network.patch:
    - Fix missing /etc/fstab when enabling network (LP: #1632405)
  * debian/rules: Fix build failure dh_install --fail-missing (LP: #1814939)

libguestfs (1:1.32.2-4ubuntu2) xenial; urgency=medium

  * No-change rebuild for ruby2.3-only support.

libguestfs (1:1.32.2-4ubuntu1) xenial; urgency=medium

  * Merge with Debian; remaining changes:
    - debian/control:
      + Build-Depends on systemtap-sdt-dev on all architectures.
      + Add qemu build dependencies for arm64 and ppc64el.
      + Switch to Ubuntu kernel meta-package names.
      + Disable Build-Depends on grub2, only needed for the quickchecks,
        which are disabled anyway.
      + Build-Depends on zfs-fuse on armhf and ppc64el as well.
    - debian/rules:
      + Disable quickchecks. Requires a readable kernel image.
      + Configure with --disable-silent-rules.

libguestfs (1:1.32.2-4) unstable; urgency=medium

  * Call "rubyX.Y -S rake" instead of rakeX.Y which is missing in ruby2.3
    (Closes: #815764)

libguestfs (1:1.32.2-3ubuntu1) xenial; urgency=medium

  * Merge with Debian; remaining changes:
    - debian/control:
      + Build-Depends on systemtap-sdt-dev on all architectures.
      + Add qemu build dependencies for arm64 and ppc64el.
      + Switch to Ubuntu kernel meta-package names.
      + Disable Build-Depends on grub2, only needed for the quickchecks,
        which are disabled anyway.
      + Build-Depends on zfs-fuse on armhf and ppc64el as well.
    - debian/rules:
      + Disable quickchecks. Requires a readable kernel image.
      + Configure with --disable-silent-rules.

libguestfs (1:1.32.2-3) unstable; urgency=medium

  * Add patch to fix Lintian error "gzip-file-is-not-multi-arch-same-safe"

libguestfs (1:1.32.2-2) unstable; urgency=medium

  * Work around cryptsetup's missing busybox dependency

libguestfs (1:1.32.2-1) unstable; urgency=medium

  * New upstream version

libguestfs (1:1.32.1-1) unstable; urgency=medium

  * New upstream version

libguestfs (1:1.32.0-2) unstable; urgency=medium

  * Add missing build-dependency for Perl bindings

libguestfs (1:1.32.0-1) unstable; urgency=medium

  * New upstream version
  * Adapt patch for building Perl bindings in separate build directory
  * Update symbols file
  * Adjust architecture list for some dependencies (Closes: #799965)
  * Add lintian overrides for several test files

libguestfs (1:1.30.6-1ubuntu2) xenial; urgency=medium

  * No-change rebuild to drop python3.4 support.

libguestfs (1:1.30.6-1ubuntu1) xenial; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - debian/control:
      + Build-Depends on systemtap-sdt-dev on all architectures.
      + Add qemu build dependencies for arm64 and ppc64el.
      + Switch to Ubuntu kernel meta-package names.
      + Disable Build-Depends on grub2, only needed for the quickchecks,
        which are disabled a...

Changed in libguestfs (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for libguestfs 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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.