ubuntu-cpc lacks common function to reverse setup_mountpoint

Bug #1716992 reported by Robert C Jennings on 2017-09-13
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
Zesty
Undecided
Unassigned

Bug Description

[SRU Justification]
After the move of livefs builds to lxd containers and use of --rbind with /dev, cloud image builds fail where setup_mountpoint was called from the common functions. There is no related teardown for this common function so extra binary hooks that called setup_mountpoint were forced to duplicate the cleanup locally which became out of sync with the setup.

This change adds a common function called teardown_mountpoint to reverse the operations performed by setup_mountpoint and makes use of that new function.

[Test case]
Daily images on cloud-images.ubuntu.com are currently failing to build as a result of this bug. The daily images are built using a private overlay on top of the livecd-rootfs in the archive, so unfortunately we can't describe directly a public end-to-end test case for this.

We will verify this fix by verifying that we are able to produce daily cloud images again for each of the releases.

[Regression potential]
For xenial we should also verify this change by doing a test build of all images against xenial-proposed to guard against any possible regressions.
For zesty, there are no ongoing builds of any projects other than cloud images so there is no risk of external regressions.

Related branches

Robert C Jennings (rcj) wrote :

Attaching a patch to add a teardown_mountpoint function to reverse the actions taken by setup_mountpoint.

Robert C Jennings (rcj) wrote :
Robert C Jennings (rcj) on 2017-09-13
description: updated
Steve Langasek (vorlon) on 2017-09-13
Changed in livecd-rootfs (Ubuntu):
status: New → Fix Committed

Hello Robert, or anyone else affected,

Accepted livecd-rootfs into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.441.6 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-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. 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 Zesty):
status: New → Fix Committed
tags: added: verification-needed verification-needed-zesty
Changed in livecd-rootfs (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Brian Murray (brian-murray) wrote :

Hello Robert, 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.17 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, 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!

Launchpad Janitor (janitor) wrote :

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

---------------
livecd-rootfs (2.455) artful; urgency=medium

  * Restore the call to 'umount -R $mountpoint' from umount_partition,
    accidentally dropped in previous upload.

 -- Steve Langasek <email address hidden> Wed, 13 Sep 2017 12:50:10 -0700

Changed in livecd-rootfs (Ubuntu):
status: Fix Committed → Fix Released
Robert C Jennings (rcj) wrote :

Marking xenial as verification failed. I have been able to test on xenial and it failed quickly.

Our first call to 'udevadm settle' in our first binary hook fails:
+ teardown_mountpoint binary/boot/filesystem.dir
+ local mountpoint=binary/boot/filesystem.dir
+ umount binary/boot/filesystem.dir/var/cache/apt
+ umount binary/boot/filesystem.dir/var/lib/apt
+ umount binary/boot/filesystem.dir/tmp
+ umount binary/boot/filesystem.dir/sys
+ umount binary/boot/filesystem.dir/proc
+ umount -R binary/boot/filesystem.dir/dev
+ udevadm settle
config/functions: line 107: udevadm: command not found
E: config/hooks/030-root-tarball.binary failed (exit non-zero). You should check for errors.

In a prior good build we see that we had not been calling udevadm until after the first call to mount_image in the common functions. We were getting udev installed as a side-effect of a call to install kpartx:
+ mount_image binary/boot/disk.ext4 1
+ apt-get install -qqy kpartx
Selecting previously unselected package udev.

I have a possible fix @ http://bazaar.launchpad.net/~rcj/livecd-rootfs/xenial-proposed/revision/1420 but I'm unable to test before I'm out of the office (and the builders have a spectacular backlog currently of ~9hrs).

tags: added: verification-failed-xenial
removed: verification-needed-xenial
Steve Langasek (vorlon) wrote :

Accepted a new livecd-rootfs into -proposed with the proposed fix for this latest problem, and resetting verification state.

tags: added: verification-needed-xenial
removed: verification-failed-xenial
Dan Watkins (daniel-thewatkins) wrote :

I've successfully built new images with the livecd-rootfs in xenial-proposed.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Launchpad Janitor (janitor) wrote :

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

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

  [ Robert C Jennings ]
  * Install udev before calls to udevadm

 -- Steve Langasek <email address hidden> Wed, 13 Sep 2017 22:10:11 -0700

Changed in livecd-rootfs (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers