Merge ~ahasenack/ubuntu/+source/isc-kea:lunar-isc-kea-apparmor-on-armhf into ubuntu/+source/isc-kea:ubuntu/devel

Proposed by Andreas Hasenack
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: ee0f85cf1a3ec7d29f8edce08418b529c7353792
Proposed branch: ~ahasenack/ubuntu/+source/isc-kea:lunar-isc-kea-apparmor-on-armhf
Merge into: ubuntu/+source/isc-kea:ubuntu/devel
Diff against target: 103 lines (+34/-12)
3 files modified
debian/changelog (+10/-0)
debian/control (+2/-1)
debian/tests/kea-dhcp4 (+22/-11)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Athos Ribeiro (community) Approve
Canonical Server MOTU reviewers Pending
Canonical Server Reporter Pending
Review via email: mp+437589@code.launchpad.net

Description of the change

At first I thought this was related to apparmor, hence the branch name, but that's not the case.

I made some changes here:
- give dhclient a bigger timeout. DHCP requests have a backoff time window.
- show more logs when it fails
- fix an actual issue with the regexp for /etc/resolv.conf

To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The test failure happened only on ubuntu, not debian, but I'll send this to debian and get the package back in sync.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks, Andreas.

This LGTM!

However, I do not have means to run these dep8 changes on arm ATM. It would be nice to either trigger these tests in a PPA or ensure they are passing before uploading.

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: ahasenack, athos-ribeiro
Uploaders: ahasenack, athos-ribeiro
MP auto-approved

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Tests are green

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Uploading isc-kea_2.2.0-3ubuntu1.dsc
Uploading isc-kea_2.2.0-3ubuntu1.debian.tar.xz
Uploading isc-kea_2.2.0-3ubuntu1_source.buildinfo
Uploading isc-kea_2.2.0-3ubuntu1_source.changes

I'll create a salsa PR once these tests run and pass in our real infra.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 23d5306..bb30f8e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
1isc-kea (2.2.0-3ubuntu1) lunar; urgency=medium
2
3 * d/t/kea-dhcp4: make the test more robust (LP: #2007855):
4 - increase dhclient timeout to 60s, and run in verbose mode
5 - show logs in the case of failure
6 - set +e inside the cleanup handler
7 - fix resolv.conf regexp
8
9 -- Andreas Hasenack <andreas@canonical.com> Mon, 20 Feb 2023 20:27:11 -0300
10
1isc-kea (2.2.0-3) unstable; urgency=medium11isc-kea (2.2.0-3) unstable; urgency=medium
212
3 [ Andreas Hasenack ]13 [ Andreas Hasenack ]
diff --git a/debian/control b/debian/control
index 7ed285a..7506b58 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
1Source: isc-kea1Source: isc-kea
2Section: net2Section: net
3Priority: optional3Priority: optional
4Maintainer: Kea <isc-kea@packages.debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Kea <isc-kea@packages.debian.org>
5Uploaders:6Uploaders:
6 Adam Majer <adamm@zombino.com>,7 Adam Majer <adamm@zombino.com>,
7 Ondřej Surý <ondrej@debian.org>,8 Ondřej Surý <ondrej@debian.org>,
diff --git a/debian/tests/kea-dhcp4 b/debian/tests/kea-dhcp4
index 6b02cdb..1a2bb66 100644
--- a/debian/tests/kea-dhcp4
+++ b/debian/tests/kea-dhcp4
@@ -15,20 +15,31 @@ declare -A dhcp4_config
15resolv_conf_bkp=$(mktemp)15resolv_conf_bkp=$(mktemp)
1616
17cleanup() {17cleanup() {
18 if [ $? -ne 0 ]; then18 rc=$?
19 set +e # so we don't exit midcleanup
20 if [ ${rc} -ne 0 ]; then
19 echo "## FAIL"21 echo "## FAIL"
22 echo
23 echo "## dmesg"
24 dmesg -T | tail -n 500
25 echo
26 echo "## kea logs"
27 journalctl -u kea-dhcp4-server.service
20 fi28 fi
29 echo
21 echo "## Cleaning up"30 echo "## Cleaning up"
22 ip link set "${server_iface}" down || :31 ip link set "${server_iface}" down
23 ip link del "${server_iface}" || :32 ip link del "${server_iface}"
24 ip link set "${bridge}" down || :33 ip link set "${bridge}" down
25 brctl delbr "${bridge}" || :34 brctl delbr "${bridge}"
26 ip netns delete "${client_ns}" || :35 ip netns delete "${client_ns}"
27 sed -r -i "/example.autopkgtest/d" /etc/hosts || :36 sed -r -i "/example.autopkgtest/d" /etc/hosts
28 if [ -s "${resolv_conf_bkp}" ]; then37 if [ -s "${resolv_conf_bkp}" ]; then
29 cat "${resolv_conf_bkp}" > /etc/resolv.conf38 cat "${resolv_conf_bkp}" > /etc/resolv.conf
30 fi39 fi
31 rm -f "${resolv_conf_bkp}" || :40 rm -f "${resolv_conf_bkp}"
41 # restore it for when we are called from the main script, and not the trap
42 set -e
32}43}
3344
34trap cleanup EXIT45trap cleanup EXIT
@@ -161,7 +172,7 @@ sleep 2s
161172
162echo173echo
163echo "## Obtaining IP via dhclient"174echo "## Obtaining IP via dhclient"
164run_on_client timeout -v 20s dhclient "${client_iface}"175run_on_client timeout -v 60s dhclient -v "${client_iface}"
165echo "## OK"176echo "## OK"
166177
167ip=$(run_on_client ip -4 -o addr show dev "${client_iface}" | awk '{print $4}')178ip=$(run_on_client ip -4 -o addr show dev "${client_iface}" | awk '{print $4}')
@@ -199,7 +210,7 @@ fi
199210
200echo211echo
201echo "## Checking that the DNS domain \"${test_domain}\" was added to resolv.conf"212echo "## Checking that the DNS domain \"${test_domain}\" was added to resolv.conf"
202if grep -qE "^search[[:blank:]]+${test_domain//./\\.}" /etc/resolv.conf; then213if grep -E "^search[[:blank:]]" /etc/resolv.conf | grep -q -w -F "${test_domain}"; then
203 echo "## OK"214 echo "## OK"
204else215else
205 echo "## ERROR"216 echo "## ERROR"
@@ -210,7 +221,7 @@ fi
210221
211echo222echo
212echo "## Releasing IP via dhclient -r"223echo "## Releasing IP via dhclient -r"
213run_on_client timeout -v 20s dhclient -r224run_on_client timeout -v 60s dhclient -v -r
214echo "## OK"225echo "## OK"
215226
216echo227echo

Subscribers

People subscribed via source and target branches