Skip to content

Commit

Permalink
tests/cluster: try to catch an refresh race
Browse files Browse the repository at this point in the history
In theory the `snap refresh` should have been done but it wasn't:

```
Tue, 26 Nov 2024 12:21:29 GMT + lxc exec cluster-2771-2 -- snap refresh
Tue, 26 Nov 2024 12:21:29 GMT All snaps up to date.
Tue, 26 Nov 2024 12:21:29 GMT + lxc exec cluster-2771-2 -- snap switch lxd --channel=5.0/edge
Tue, 26 Nov 2024 12:21:29 GMT error: snap "lxd" has "refresh-snap" change in progress
```

The snapd team asked to look at `snap changes` around that issue.

Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Nov 26, 2024
1 parent e1a0e48 commit f8aa537
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/cluster
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ fi
echo "==> Upgrading the cluster"
for i in $(seq "${SIZE}"); do
lxc exec "${PREFIX}-$i" -- snap refresh
# XXX: there should be no refresh ongoing but we've seen races before so let's collect evidences
lxc exec "${PREFIX}-$i" -- snap changes
lxc exec "${PREFIX}-$i" -- snap switch lxd --channel="$3"
if [ "$i" = "${SIZE}" ]; then
lxc exec "${PREFIX}-$i" -- snap wait system seed.loaded
Expand Down

0 comments on commit f8aa537

Please sign in to comment.