Merge ~paelzer/ubuntu/+source/open-iscsi:retry-boot-tests-cosmic into ubuntu/+source/open-iscsi:ubuntu/cosmic-devel

Proposed by Christian Ehrhardt 
Status: Superseded
Proposed branch: ~paelzer/ubuntu/+source/open-iscsi:retry-boot-tests-cosmic
Merge into: ubuntu/+source/open-iscsi:ubuntu/cosmic-devel
Diff against target: 75 lines (+36/-6) (has conflicts)
2 files modified
debian/changelog (+14/-0)
debian/tests/tgt-boot-test (+22/-6)
Conflict in debian/changelog
Reviewer Review Type Date Requested Status
Canonical Server packageset reviewers Pending
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+349798@code.launchpad.net

This proposal has been superseded by a proposal from 2018-07-18.

To post a comment you must log in.

Unmerged commits

4d42110... by Christian Ehrhardt 

changelog: retry test being flaky on LP

Signed-off-by: Christian Ehrhardt <email address hidden>

8a38bb5... by Christian Ehrhardt 

retry test being flaky on LP

Signed-off-by: Christian Ehrhardt <email address hidden>

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 4474c35..1997399 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,4 @@
6+<<<<<<< debian/changelog
7 open-iscsi (2.0.874-5ubuntu4) cosmic; urgency=medium
8
9 * debian/tests/install: ignore the potential stderr of the probing command
10@@ -20,6 +21,19 @@ open-iscsi (2.0.874-5ubuntu3) cosmic; urgency=medium
11 - debian/tests/install: fix tests to work with socket activation
12
13 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 23 May 2018 15:50:01 +0200
14+=======
15+open-iscsi (2.0.874-5ubuntu3) cosmic; urgency=medium
16+
17+ * debian/tests/tgt-boot-test: The nested kvm based boot is test is known to
18+ be flaky (on LP infrastructure only), so retry it.
19+ The issue usually is after the actually-to-be-tested iscsi boot itself,
20+ initialization does not fully run to cloud-init to shut it down.
21+ Sucessful runs usually take ~230-450 seconds, so set timeout down from 60
22+ to 10 minutes and retry 6 times; That is approximately the same worst case
23+ runtime for a six times better chance to get a good run.
24+
25+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 18 Jul 2018 11:00:25 +0200
26+>>>>>>> debian/changelog
27
28 open-iscsi (2.0.874-5ubuntu2) bionic; urgency=medium
29
30diff --git a/debian/tests/tgt-boot-test b/debian/tests/tgt-boot-test
31index 2f8bff3..c098186 100755
32--- a/debian/tests/tgt-boot-test
33+++ b/debian/tests/tgt-boot-test
34@@ -511,20 +511,36 @@ main() {
35 netdev_args[${#netdev_args[@]}]="--netdev=$i"
36 done
37
38- local mem="512" start="$SECONDS" ret=""
39+ local mem="512" ret=""
40 local cmd=""
41 cmd=(
42- timeout --kill-after=1m --signal=TERM ${BOOT_TIMEOUT:-60m}
43+ timeout --kill-after=1m --signal=TERM ${BOOT_TIMEOUT:-10m}
44 xkvm "${netdev_args[@]}" ${overlay_drive_xkvm} "${pt[@]}" --
45 -echr 0x5
46 -m $mem ${serial_log:+-serial "file:$serial_log"} -nographic
47 -kernel "${t_kernel}" -initrd "${t_initrd}"
48 -append "${cmdline}"
49 )
50- debug 1 "executing: ${cmd[*]}"
51- "${cmd[@]}"
52- ret=$?
53- debug 1 "xkvm returned $ret in $((SECONDS-start))s"
54+ # The nested kvm based boot is test is known to be flaky (on LP
55+ # infrastructure only), so retry it.
56+ # The issue usually is after the actually-to-be-tested iscsi boot itself,
57+ # initialization does not fully run to cloud-init to shut it down.
58+ # Sucessful runs usually take ~230-450 seconds, so set timeout down from 60
59+ # to 10 minutes and retry 6 times; That is approximately the same worst case
60+ # runtime for a six times better chance to get a good run.
61+ local retry=0
62+ local maxretries=6
63+ until [ ${retry} -ge ${maxretries} ]; do
64+ ((retry++))
65+ debug 1 "Try ${retry}/${maxretries}: executing: ${cmd[*]}"
66+ local starttime="$SECONDS"
67+ "${cmd[@]}"
68+ ret=$?
69+ debug 1 "Try ${retry}/${maxretries}: xkvm returned $ret in $((SECONDS-starttime))s"
70+ if [ ${ret} -eq 0 ]; then
71+ break
72+ fi
73+ done
74 return $ret
75 }
76

Subscribers

People subscribed via source and target branches