From 077b122abed36721bbc2b4a0b1df2098a959cbc0 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 27 Feb 2024 14:38:59 -0500 Subject: [PATCH 1/4] run-integration-tests-in-lxd: switch to ubuntu-daily: Signed-off-by: Simon Deziel --- integration/run-integration-tests-in-lxd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/run-integration-tests-in-lxd b/integration/run-integration-tests-in-lxd index b16e6bb3..25119a97 100755 --- a/integration/run-integration-tests-in-lxd +++ b/integration/run-integration-tests-in-lxd @@ -20,7 +20,7 @@ function run_tests { local target="$1" local image="${RELEASE_IMAGES[$target]}" local container_name="pylxd-${target}-$$" - local container_image="ubuntu:${image}" + local container_image="ubuntu-daily:${image}" echo "Running ${image} integration tests" lxc launch --ephemeral "$container_image" "$container_name" -c security.nesting=true From 2c328a698174eda7aa5ca84c3ba138f7528f1893 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 27 Feb 2024 14:41:55 -0500 Subject: [PATCH 2/4] run-integration-tests: report which LXD version is being tested Signed-off-by: Simon Deziel --- integration/run-integration-tests | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration/run-integration-tests b/integration/run-integration-tests index dca099be..028e27e1 100755 --- a/integration/run-integration-tests +++ b/integration/run-integration-tests @@ -46,6 +46,10 @@ save_trust_list() { OLD_TRUST_LIST="$(mktemp)" save_trust_list > "${OLD_TRUST_LIST}" +# Report which LXD version is being tested +snap list lxd || true +lxc version + # finally run the integration tests tox -e integration From 7dd50e85b9a9509586e7037276fecc96190cf4e1 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 27 Feb 2024 14:48:37 -0500 Subject: [PATCH 3/4] run-integration-tests-in-lxd: add noble/24.04 Signed-off-by: Simon Deziel --- integration/run-integration-tests-in-lxd | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/run-integration-tests-in-lxd b/integration/run-integration-tests-in-lxd index 25119a97..aee425b3 100755 --- a/integration/run-integration-tests-in-lxd +++ b/integration/run-integration-tests-in-lxd @@ -14,6 +14,7 @@ DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" declare -A RELEASE_IMAGES=( [focal]="20.04" [jammy]="22.04" + [noble]="24.04" ) function run_tests { From 06ab061297c89222e6ba8ca114f0c264ee3cc0ec Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 27 Feb 2024 14:54:33 -0500 Subject: [PATCH 4/4] run-integration-tests-in-lxd: ignore error returned by cloud-init status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` + lxc exec pylxd-noble-329986 -- cloud-init status --long --wait ............ status: done extended_status: degraded done boot_status_code: enabled-by-generator last_update: Tue, 27 Feb 2024 19:49:44 +0000 detail: DataSourceLXD errors: [] recoverable_errors: WARNING: - Unable to get zpool status of default: Unexpected error while running command. Command: ['zpool', 'status', 'default'] Exit code: - Reason: [Errno 2] No such file or directory: b'zpool' Stdout: - Stderr: - ``` This was noticed with a host running lxd latest/edge snap and using a zfs storage pool: ``` $ snap list lxd Name Version Rev Tracking Publisher Notes lxd git-2688037 27360 latest/edge canonical✓ - ``` This is a workaound for https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2055219 with a proper fix proposed in https://github.com/canonical/cloud-init/pull/4970. Signed-off-by: Simon Deziel --- integration/run-integration-tests-in-lxd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/run-integration-tests-in-lxd b/integration/run-integration-tests-in-lxd index aee425b3..e36f93a7 100755 --- a/integration/run-integration-tests-in-lxd +++ b/integration/run-integration-tests-in-lxd @@ -29,7 +29,8 @@ function run_tests { lxc exec "$container_name" -- mkdir -p /opt/pylxd { cd "$DIR/.." && git archive --format=tar HEAD; } | lxc exec "$container_name" -- tar -xf - -C /opt/pylxd - lxc exec "$container_name" -- cloud-init status --long --wait + # Workaround https://github.com/canonical/cloud-init/pull/4970 + lxc exec "$container_name" -- cloud-init status --long --wait || true lxc exec "$container_name" --cwd /opt/pylxd -- integration/run-integration-tests lxc delete --force "$container_name" }