Skip to content

Commit

Permalink
run-integration-tests-in-lxd: ignore error returned by cloud-init status
Browse files Browse the repository at this point in the history
```
+ 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 canonical/cloud-init#4970.

Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Feb 27, 2024
1 parent 7dd50e8 commit 06ab061
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion integration/run-integration-tests-in-lxd
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 06ab061

Please sign in to comment.