In some cases the reboot was happening while running "snap watch", it
makes more sense to run this after the reboot to ensure that the
change has finished.
In some cases the reboot was happening while running "snap watch", it
makes more sense to run this after the reboot to ensure that the
change has finished.
To support upgrade-paths to newer snapd and the new restart logic, when doing refreshes of snapd with other essential snaps, it could end up failing the refresh of the other essential snaps. Default to all restarts being acted like they are restart boundaries, if none have been configured.
This tests was testing refresh only to edge. Which means it would not
fail in a branch but only once it is merged to master. The new variant
also test refresh to the current version to make sure we do not break
refresh.
Before it would result it being added to install mode as well, when we only set up the minimal set of snaps (gadget, kernel, base, snapd). If the validation-set contained any snaps besides these, it would fail. Wait until run mode, where we set up any non-essential snaps, and after this we expect all snaps to be present in system.
`snap install` may cause reboot before the command ends, which causes
a deconnection. ssh returns 255 when a error happens, so we detect
the deconnection that way.
Here are the expected reboot causes:
* Make current revision for snap "core" unavailable
* Make snap "core" (unset) available to the system
* Make current revision for snap "pc-kernel" unavailable
* Make snap "pc-kernel" (unset) available to the system
* tests/muinstaller: allow installing Ubuntu Core images
* tests/muinstaller-core: add test using muinstaller for UC installation
This new test runs muinstaller installing Ubuntu Core images.
* tests/muinstaller: build statically and update deps
* tests: change order of arguments for muinstaller invocations
* tests/muinstaller: use better function names, remove unneeded arg
* tests/muinstaller-core: some minor fixes
The "sudo timedatectl set-ntp false" command some times fails with
message:
Failed to set ntp: Connection timed out
Apparently because it takes a bit of time to start
org.freedesktop.timedate1 and then stop systemd-timedated, as trying
again fixes the issue. Do some retries to prevent random failures of
this spread test.
* snap: support install/refresh that result in "Wait" changes in the cli better
On a classic system that supports mode the user experience when refreshing
a snap in wait state (like the kernel) is not great. The progress meter just
displays that a "Re-refresh" is in doing state. This is confusing for the
user as really a reboot is required.
So this commit change the behavior so that after a refresh that
ends up in a "Wait" snap will show a message:
```
Task set to wait until a manual system restart allows to continue
```
* snap: rename waitWaitTasks->waitForTasksInWaitStatus
* move "wait" handling ealier in showDone() and add missing unit test
* snap: remove warning about pressing "ctrl-c" as it no longer applies (thanks to Samuele)
* tests/lib/tools: use correct unit switch
* t/core/snapd-failover: use SIGKILL instead of SIGSEGV
We should avoid triggering of the segmentation fault check
* t/regression/mount-order-regression: set no mem limit
Unfortunately it happens that we hit the memory limit while setting up security profiles for the snap. Set no memory limit for this test
---------
Co-authored-by: Philip Meulengracht <philip.meulengracht@canonical.com>