Merge ~paride/autopkgtest:lp1952084-mask-snapd-seeded into ~ubuntu-release/autopkgtest/+git/development:master

Proposed by Paride Legovini
Status: Merged
Merged at revision: f7b890b057c274398ff2cb45cce1629678c8f4e2
Proposed branch: ~paride/autopkgtest:lp1952084-mask-snapd-seeded
Merge into: ~ubuntu-release/autopkgtest/+git/development:master
Diff against target: 28 lines (+10/-0)
1 file modified
tools/autopkgtest-build-lxd (+10/-0)
Reviewer Review Type Date Requested Status
Brian Murray Approve
Ubuntu Release Team Pending
Review via email: mp+429901@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Paride Legovini (paride) wrote :

As mentioned this is not meant to be upstreamed. Should we want to drop this delta w.r.t. upstream we could add a generic --pre-command option autopkgtest-build-lxd, which we can then use from armhf-lxd.userdata to mask snapd.seeded.service.

Revision history for this message
Brian Murray (brian-murray) :
review: Approve
Revision history for this message
Paride Legovini (paride) wrote (last edit ):

This is useless without a fix for LP: #1989603, so I'm deferring merging for now.

If we switch to minimal images (for the moment only available for amd64) this won't be necessary at all.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/autopkgtest-build-lxd b/tools/autopkgtest-build-lxd
2index 40c92c5..a3e12e7 100755
3--- a/tools/autopkgtest-build-lxd
4+++ b/tools/autopkgtest-build-lxd
5@@ -69,6 +69,12 @@ setup() {
6 fi
7
8 sleep 5
9+
10+ # Workaround for LP: #1952084
11+ # Drop if fixed or if we switch to minimal images in armhf-lxd.userdata.
12+ # This has to go before the "we get a numeric runlevel" check below.
13+ lxc exec "$CONTAINER" -- systemctl mask snapd.seeded.service --now
14+
15 if lxc exec "$CONTAINER" -- systemctl mask serial-getty@getty.service; then
16 lxc exec "$CONTAINER" -- reboot
17 fi
18@@ -86,6 +92,10 @@ setup() {
19 exit 1
20 }
21
22+ # Workaround for LP: #1989603
23+ # Drop if fixed or if we switch to minimal images in armhf-lxd.userdata.
24+ lxc exec "$CONTAINER" -- umount /var/snap/lxd/common/var/lib/lxcfs || true
25+
26 # wait until a systemd based container has networking
27 if ! echo '[ ! -d /run/systemd/system ] || systemctl start network-online.target' | timeout 60 lxc exec "$CONTAINER" -- sh -e; then
28 echo "Timed out waiting for container to start network-online.target" >&2

Subscribers

People subscribed via source and target branches