Merge lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-zesty into lp:~ubuntu-core-dev/livecd-rootfs/zesty-proposed

Proposed by Balint Reczey
Status: Merged
Merged at revision: 1472
Proposed branch: lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-zesty
Merge into: lp:~ubuntu-core-dev/livecd-rootfs/zesty-proposed
Diff against target: 54 lines (+26/-2)
3 files modified
debian/changelog (+11/-0)
debian/tests/control (+1/-1)
live-build/functions (+14/-1)
To merge this branch: bzr merge lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-zesty
Reviewer Review Type Date Requested Status
Steve Langasek Pending
Review via email: mp+323791@code.launchpad.net

Description of the change

  * Resurrect Balint's fix from
    lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix to wrap kpartx
    and trap spurious errors, since the problem is still being seen
    intermittently on i386 despite us calling sync before kpartx.
  * Mark autopkgtests isolation-machine since debootstrap won't work in a
    container.

To post a comment you must log in.
1472. By Steve Langasek

Resurrect Balint's fix from
lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix to wrap kpartx
and trap spurious errors, since the problem is still being seen
intermittently on i386 despite us calling sync before kpartx. (LP: #1684090)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-04-28 21:44:10 +0000
3+++ debian/changelog 2017-05-11 13:34:46 +0000
4@@ -1,3 +1,14 @@
5+livecd-rootfs (2.441.3) UNRELEASED; urgency=medium
6+
7+ * Resurrect Balint's fix from
8+ lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix to wrap kpartx
9+ and trap spurious errors, since the problem is still being seen
10+ intermittently on i386 despite us calling sync before kpartx. (LP: #1684090)
11+ * Mark autopkgtests isolation-machine since debootstrap won't work in a
12+ container.
13+
14+ -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 28 Apr 2017 17:41:05 -0700
15+
16 livecd-rootfs (2.441.2) zesty; urgency=medium
17
18 * The ubuntu-server:live should use a casper-based initramfs to work
19
20=== modified file 'debian/tests/control'
21--- debian/tests/control 2017-04-10 17:08:27 +0000
22+++ debian/tests/control 2017-05-11 13:34:46 +0000
23@@ -1,3 +1,3 @@
24 Tests: default-bootstraps
25 Depends: @, lsb-release
26-Restrictions: needs-root
27+Restrictions: needs-root isolation-machine
28
29=== modified file 'live-build/functions'
30--- live-build/functions 2017-04-12 03:16:48 +0000
31+++ live-build/functions 2017-05-11 13:34:46 +0000
32@@ -11,9 +11,22 @@
33 apt-get -qqy install dosfstools gdisk
34
35 clean_loops() {
36+ local kpartx_ret
37+ local kpartx_stdout
38
39 if [ -n "${backing_img}" ]; then
40- kpartx -v -d "${backing_img}"
41+ # sync before removing loop to avoid "Device or resource busy" errors
42+ sync
43+ kpartx_ret=""
44+ kpartx_stdout=$(kpartx -v -d "${backing_img}") || kpartx_ret=$?
45+ echo "$kpartx_stdout"
46+ if [ -n "$kpartx_ret" ]; then
47+ if echo "$kpartx_stdout" | grep -q "loop deleted: "; then
48+ echo "Suppressing kpartx returning error (#860894)"
49+ else
50+ exit $kpartx_ret
51+ fi
52+ fi
53 unset backing_img
54 fi
55

Subscribers

People subscribed via source and target branches