Merge lp:~rcj/vmbuilder/jenkins_kvm into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Robert C Jennings on 2018-10-15
Status: Merged
Merged at revision: 814
Proposed branch: lp:~rcj/vmbuilder/jenkins_kvm
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 73 lines (+31/-4)
1 file modified
templates/img-update.tmpl (+31/-4)
To merge this branch: bzr merge lp:~rcj/vmbuilder/jenkins_kvm
Reviewer Review Type Date Requested Status
Francis Ginther 2018-10-15 Approve on 2018-10-15
Dan Watkins 2018-10-15 Approve on 2018-10-15
Review via email: mp+356738@code.launchpad.net

Commit message

builder image: support cosmic builds

* remove binfmt-misc module on host to avoid chroot teardown issue
* python-vm-builder not present in cosmic
* Kill dirmngr/gpg-agent before chroot teardown

To post a comment you must log in.
review: Approve
Francis Ginther (fginther) wrote :

Approve

review: Approve
lp:~rcj/vmbuilder/jenkins_kvm updated on 2018-10-27
813. By Francis Ginther on 2018-10-26

Add 'git' to the build environment for maas images [a=fginther] [r=rcj,philroche]

The maas branches have moved from bzr to git and we therefore need
git to be available. This also configures an http.proxy when cloning.
The proxy is only needed for the ppc64el jobs, but has to also work
without the proxy when building the other architectures.

814. By Robert C Jennings on 2018-10-27

Merge lp:~rcj/vmbuilder/jenkins_kvm into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm [a=rcj] [r=daniel-thewatkins,fginther]

builder image: support cosmic builds

* remove binfmt-misc module on host to avoid chroot teardown issue
* python-vm-builder not present in cosmic
* Kill dirmngr/gpg-agent before chroot teardown

MP: https://code.launchpad.net/~rcj/vmbuilder/jenkins_kvm/+merge/356738

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'templates/img-update.tmpl'
2--- templates/img-update.tmpl 2017-10-26 19:35:04 +0000
3+++ templates/img-update.tmpl 2018-10-15 15:40:16 +0000
4@@ -59,9 +59,11 @@
5 }
6 done
7
8- cp /etc/mtab "${mp}/etc/mtab" &&
9- debug "Copied fake mtab over" ||
10- fail "Unable to copy mtab in place"
11+ if [ ! -e "${mp}/etc/mtab" ]; then
12+ cp /etc/mtab "${mp}/etc/mtab" &&
13+ debug "Copied fake mtab over" ||
14+ fail "Unable to copy mtab in place"
15+ fi
16
17 cat > "${mp}/usr/sbin/policy-rc.d" << EOF
18 #!/bin/sh
19@@ -148,6 +150,20 @@
20 sync
21 sleep 5
22
23+ # From yakkety we have detected errors when trying to unmount /dev
24+ # Seems this is caused by run-away GPG processes after using a PPA,
25+ # dirmngr & gpg-agent hold on to files under ${mp}/dev
26+ # We are not aware of a lp bug # for this for now
27+ case $suite in
28+ precise|trusty|xenial)
29+ # These are not affected by the gpg run-away process issue
30+ ;;
31+ *)
32+ killall --verbose --wait dirmngr || true
33+ killall --verbose --wait gpg-agent ||true
34+ ;;
35+ esac
36+
37 umount -f "${mp}/dev/pts" &&
38 debug "Unmounted /dev/pts in chroot" ||
39 fail "Unable to dismount /dev/pts in chroot"
40@@ -179,6 +195,11 @@
41 { debug " Command FAILED!"; sleep 60; fail "chrooted-command failed!"; }
42 }
43
44+# Installation of qemu-user-static in a cosmic chroot results in a root fs
45+# that can not be unmounted if the host binfmt_misc module is loaded on the host
46+apt-get purge -qqy binfmt-support
47+modprobe -r binfmt_misc
48+
49 # Setup the environment
50 build_chroot
51
52@@ -189,7 +210,6 @@
53 # Installation of base packages
54 kheaders=$(xchroot dpkg-query -W | awk '/linux-image-3.*virtual/{print$1}' | sed "s|image|headers|g")
55 pkgs=(bzr debootstrap
56- python-vm-builder
57 kpartx
58 qemu-kvm
59 debhelper
60@@ -226,6 +246,13 @@
61 ;;
62 esac
63
64+# python-vm-builder was dropped in cosmic
65+case "${suite}" in
66+ trusty|xenial|bionic)
67+ pkgs+=(python-vm-builder)
68+ ;;
69+esac
70+
71 # Installation of packages
72 debug "Performing package operations"
73 xchroot apt-get -y update

Subscribers

People subscribed via source and target branches