544 Commits

Author SHA1 Message Date
Samuele Pedroni
a30c4abe8d secboot: revert move to new version (revert #10715)
Merge pull request #10930 from anonymouse64/revert-10715-bump-secboot

Reverts #10715

Sadly the new version of secboot seems to auto-upgrade v1 keys to v2, which old recovery systems and even the currently published initrds/kernels do not understand so they fail to unlock the encrypted partitions in the initrd.

This PR includes #10929 which adds the following tests:
* test from stable snapd + stable kernel refreshing to snapd from the PR
* test from stable kernel + snapd from the PR

and for each variant then do something which triggers a reseal operation and a reboot to ensure that the new snapd will not break old recovery system kernels
2021-10-18 11:49:18 -05:00
Maciej Borzecki
7899dbf9df tests/nested/manual/core20-remodel: verify snapd_good_recovery_systems= in bootenv
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-10-01 16:07:52 +02:00
Maciej Borzecki
d805c492d1 Merge remote-tracking branch 'upstream/master' into bboozzoo/uc20-remodel-enable 2021-10-01 10:14:55 +02:00
Sergio Cazzolato
c6ed0fcfe3 Add the comments 2021-09-24 08:09:42 -03:00
Sergio Cazzolato
1a0ed2f528 Fix error trying to create the extra-snaps dir which already exists
The test tests/nested/manual/core20-cloud-init-maas-signed-seed-data is
failing trying to create the extra-snaps directory which is being
created while the test is prepared.

+ mkdir
/home/gopath/src/github.com/snapcore/snapd/tests/nested/manual/core20-cloud-init-maas-signed-seed-data/extra-snaps
mkdir: cannot create directory
‘/home/gopath/src/github.com/snapcore/snapd/tests/nested/manual/core20-cloud-init-maas-signed-seed-data/extra-snaps’:
File exists
2021-09-23 10:56:38 -03:00
Michael Vogt
673cd60a39 Merge pull request #10573 from anonymouse64/feature/cloud-init-grade-signed-filtered
sysconfig/cloud-init: filter MAAS c-i config from ubuntu-seed on grade signed
2021-09-22 10:00:42 +02:00
Michael Vogt
9804780799 Merge pull request #10740 from bboozzoo/bboozzoo/fault-injection
osutil: helper for injecting run time faults in snapd
2021-09-21 20:07:11 +02:00
Sergio Cazzolato
5d19e41b9a Merge branch 'master' into tests-nested-tool-part-2 2021-09-20 17:52:48 -03:00
Ian Johnson
0f4c772556 Merge branch 'master' into feature/cloud-init-grade-signed-filtered
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-20 09:43:21 -05:00
Maciej Borzecki
49259183b6 Merge remote-tracking branch 'upstream/master' into bboozzoo/fault-injection 2021-09-20 12:55:18 +02:00
Maciej Borzecki
a547b61fe8 Merge remote-tracking branch 'upstream/master' into bboozzoo/uc20-remodel-enable 2021-09-17 16:27:21 +02:00
Ian Johnson
4ea797fe29 tests/nested/manual/core20-cloud-init-maas-signed-seed-data: add add'l check
Thanks to Samuele for pointing out that we should check this as well.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-16 18:56:10 -05:00
Ian Johnson
3d82e9e601 tests/nested/manual: add uc20 maas cloud-init test
This test ensures that with grade signed images, MAAS is able to put cloud-init
configuration files onto ubuntu-seed and they are picked up and copied to the
appropriate directory at runtime such that cloud-init can connect to MAAS
successfully.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-15 11:13:39 -05:00
Sergio Cazzolato
2ffbc768cf Fix 2 tests which are failing 2021-09-14 16:37:02 -03:00
Ian Johnson
1766654c91 tests/nested/manual: use loop for checking for initialize-system task done
There is a race here in waiting for snapd to finish this task, since the
nested tooling will wait for snapd to be seeded, but this task runs immediately
after seeding is done, so we may execute the code before the task is actually
done executing.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-14 11:53:14 -05:00
Sergio Cazzolato
687d9b5bb4 Make sure the extra-snaps dir is created while nested tests are prepared 2021-09-14 09:53:10 -03:00
Maciej Borzecki
4b44973d85 Merge remote-tracking branch 'upstream/master' into bboozzoo/uc20-remodel-enable 2021-09-14 09:18:11 +02:00
Sergio Cazzolato
38cf0e94bd Fix shell check 2021-09-13 14:32:29 -03:00
Sergio Cazzolato
f50ddc1ff3 Update test nested tool part 2
This is the continuation of the nested tool changes:
1. Most of the tested tests are not using the nested helper anymore
2. Many new functinos added to the nested tool
3. Loops updated to use retry instead
4. Small fixes
2021-09-10 17:49:27 -03:00
Maciej Borzecki
6b8ac78980 Merge remote-tracking branch 'upstream/master' into bboozzoo/uc20-remodel-enable 2021-09-08 16:05:54 +02:00
Sergio Cazzolato
7b0fda824c Merge remote-tracking branch 'upstream/master' into tests-move-nested-part1 2021-09-08 09:40:33 -03:00
Sergio Cazzolato
aeb707930e Run tests.cleanup restore in all the nested suites 2021-09-07 13:12:33 -03:00
Maciej Borzecki
37a243a628 tests/nested/core/core20-fault-inject: exercise fault injection
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-07 13:02:47 +02:00
Sergio Cazzolato
903eda237a Manually stop the fakedevicesvc service
This is to avoid the error

systemd-run --collect --unit fakedevicesvc fakedevicesvc localhost:11029
Failed to start transient service unit: Unit fakedevicesvc.service
already exists.

The the following tests were executed in order:

google-nested:ubuntu-20.04-64:tests/nested/manual/core20-install-device-file-install-via-hook-hack
google-nested:ubuntu-20.04-64:tests/nested/manual/grade-signed-above-testkeys-boot:secured
2021-09-06 18:42:41 -03:00
Sergio Cazzolato
148fbfe4e2 fix gadget instead of gedget 2021-09-06 16:38:56 -03:00