Merge ~paelzer/ubuntu/+source/libvirt:lp-1899180-flaky-smoke-lxc-FOCAL into ubuntu/+source/libvirt:ubuntu/focal-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: dc7889e974bfb56ffa38aff5380486dea5a8777b
Merged at revision: dc7889e974bfb56ffa38aff5380486dea5a8777b
Proposed branch: ~paelzer/ubuntu/+source/libvirt:lp-1899180-flaky-smoke-lxc-FOCAL
Merge into: ubuntu/+source/libvirt:ubuntu/focal-devel
Diff against target: 87 lines (+41/-6)
3 files modified
debian/changelog (+9/-0)
debian/tests/control (+1/-1)
debian/tests/smoke-lxc (+31/-5)
Reviewer Review Type Date Requested Status
Robie Basak sru Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+395009@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Robie Basak (racb) wrote :

Matches Hirsute upload. Since Hirsute isn't uploaded yet (as it was pending review), shall I leave it to you to upload all of these, and then all I need to do is check the upload matches these MPs and then let the SRU through?

review: Approve (sru)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I've uploaded Hirsute - after waiting a bit (build and some tests at least) I'll also upload these to the SRU queue.
I'd then ping you to get them processed - thanks in advance.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/libvirt
 * [new tag] upload/6.0.0-0ubuntu8.6 -> upload/6.0.0-0ubuntu8.6

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading libvirt_6.0.0-0ubuntu8.6.dsc: done.
  Uploading libvirt_6.0.0-0ubuntu8.6.debian.tar.xz: done.
  Uploading libvirt_6.0.0-0ubuntu8.6_source.buildinfo: done.
  Uploading libvirt_6.0.0-0ubuntu8.6_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index c4f2b0d..e043ce2 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+libvirt (6.0.0-0ubuntu8.6) focal; urgency=medium
7+
8+ * Improve flaky smoke-lxc test (LP: #1899180)
9+ - d/t/control, d/t/smoke-lxc: retry service restart and skip test if
10+ failing; This was flaky on some release/architectures
11+ - d/t/smoke-lxc: retry check_domain being flaky on arm64
12+
13+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 08 Dec 2020 15:09:17 +0100
14+
15 libvirt (6.0.0-0ubuntu8.5) focal; urgency=medium
16
17 * d/p/ubuntu/lp-1887490-*: add named types and definitions for EPYC-Rome
18diff --git a/debian/tests/control b/debian/tests/control
19index 92766be..065bc8e 100644
20--- a/debian/tests/control
21+++ b/debian/tests/control
22@@ -9,7 +9,7 @@ Restrictions: allow-stderr, isolation-container
23
24 Tests: smoke-lxc
25 Depends: libvirt-daemon-system, libvirt-daemon-driver-lxc, libvirt-clients, libxml2-utils
26-Restrictions: allow-stderr, needs-root, isolation-machine
27+Restrictions: allow-stderr, needs-root, isolation-machine, skippable
28
29 Tests: build-test
30 Depends: libvirt-dev, build-essential, pkg-config
31diff --git a/debian/tests/smoke-lxc b/debian/tests/smoke-lxc
32index 081854a..344c000 100755
33--- a/debian/tests/smoke-lxc
34+++ b/debian/tests/smoke-lxc
35@@ -16,10 +16,36 @@ cleanup()
36 fi
37 }
38
39+try_check_domain()
40+{
41+ for _ in $(seq 10); do
42+ check_domain && return
43+ sleep 2s
44+ done
45+ echo "Known to be unreliable on test infrastructure - skipping"
46+ exit 77
47+}
48+
49 check_domain()
50 {
51- virsh list | grep -qs "${DOMAIN}[[:space:]]\+running"
52- virsh lxc-enter-namespace --noseclabel ${DOMAIN} /bin/ls /bin/ls
53+ rc=0
54+ virsh list | grep -qs "${DOMAIN}[[:space:]]\+running"
55+ rc=$((rc+$?))
56+ virsh lxc-enter-namespace --noseclabel ${DOMAIN} /bin/ls /bin/ls
57+ rc=$((rc+$?))
58+ return $rc
59+}
60+
61+try_restart_libvirtd()
62+{
63+ for _ in $(seq 10); do
64+ systemctl restart libvirtd && return
65+ sleep 2s
66+ done
67+ # This turned out to be flaky, non reproducible outside of LP-infra and
68+ # is not what we want to test, Skip the test in this case
69+ echo "Restart failed while checking for container-survival-through restart - skipping".
70+ exit 77
71 }
72
73 trap cleanup EXIT
74@@ -35,10 +61,10 @@ rm -f /var/log/libvirt/lxc/sl.log
75 virsh start ${DOMAIN}
76 # Check virtlogd is running
77 grep -qs "starting up" /var/log/libvirt/lxc/sl.log
78-check_domain
79+try_check_domain
80 # Make sure a restart doesn't termiante the domain
81-systemctl restart libvirtd
82-check_domain
83+try_restart_libvirtd
84+try_check_domain
85 virsh destroy ${DOMAIN} || true
86 virsh undefine ${DOMAIN}
87 CLEANED_UP=1

Subscribers

People subscribed via source and target branches