58926 Commits

Author SHA1 Message Date
Philip Meulengracht
a9c308a6cd release: 2.61 (#13299)
release: 2.61
2.61
2023-10-13 13:43:29 +02:00
Valentin David
06dd53147d boot: unlock snapd state when sealing keys 2023-10-13 12:37:24 +02:00
Philip Meulengracht
f171da593c overlord: make link-snap request a reboot for gadget updates if any update to assets was made 2023-10-13 12:33:38 +02:00
Hemanth Nakkina
88021ef4a1 interfaces/microstack-support: read access to /proc/task/sched{,stat}
microstack requires read access to @{PROC}/*/{,task/*/}sched and
@{PROC}/*/{,task/*/}schedstat to allow virsh to read cpu statistics
of the instances.

Without this rule, openstack-hypervisor.virsh domstat list does not
print cpu statistics, vcpu.<id>.time, vcpu.<id>.stat.

Apparmor deny rule in dmesg:
[98847.604617] audit: type=1400 audit(1693470840.357:1499): \
apparmor="DENIED" operation="open" profile="snap.openstack-hypervisor.libvirtd" \
name="/proc/2014588/task/2014595/sched" pid=3668724 comm="rpc-libvirtd" \
requested_mask="r" denied_mask="r" fsuid=0 ouid=0

This rule is also required by ceilometer service running on the
openstack-hypervisor snap which queries libvirt for the cpu/memory/disk
statistics of the instances running on hypervisor.
2023-10-12 12:28:16 +02:00
Peter Sabaini
5711f08b3f i/b/microceph: allow more access for microceph-support (#13150)
* i/b/microceph: fix microceph support

Allow more types of block devices to be added as an OSD (bcache,
indiv. partitions)

Allow access to the rbd sysfs controls for managing rbd-backed block
devices (cf.
https://docs.kernel.org/admin-guide/abi-testing.html#abi-file-testing-sysfs-bus-rbd)

* Add NVMe partition support

Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>

* Allow for higher number of SCSI and virtio devices

Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>

---------

Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>
2023-10-12 12:28:01 +02:00
Andrew Phelps
72f93cb14c packaging: fix unneeded errtracker patches (#13288)
* packaging: fix unneeded errtracker patches

* packaging: remove errtrack specific parts of the patches

---------

Co-authored-by: Michael Vogt <mvo@ubuntu.com>
2023-10-12 11:46:31 +02:00
Alfonso Sánchez-Beato
b0b324eb62 tests/core20-boot-config-update: wait for the reboot always
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.
2023-10-11 10:17:28 +02:00
Alfonso Sánchez-Beato
199073455b tests/core20-boot-config-update: wait for the reboot before the watch
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.
2023-10-11 10:17:28 +02:00
Miguel Pires
0e64f05957 aspects: support 'any' type in aspect schemas
Support an "any" type that accepts data from any other type (e.g., int,
strings, etc) except for the null value. This can be used in maps as the
value of keys that are expected to be present but without a particular
type.

Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
2023-10-10 17:51:22 +01:00
Sergio Cazzolato
affe9c968b fix store-state tool restoring fakestore (#13239)
Some tests fail before the fake store is configured so the dir
"STORE_DIR" is nor created. When the test is restored, the test fails to
restore because the tool store-state is returning 1 in case the
STORE_DIR dir does not exist.

This change makes more robust the store-state tool to manage this
scenario and continue in case the fake store was not configured
properly.
2023-10-10 09:18:23 -03:00
Andrew Phelps
87534ccdb9 o/snapstate: remove other unneeded test 2023-10-09 16:00:35 +02:00
Andrew Phelps
f659a07117 o/hookstate: move TODO 2023-10-09 16:00:35 +02:00
Andrew Phelps
264832ac02 o/snapstate: remove test for error reporting 2023-10-09 16:00:35 +02:00
Andrew Phelps
1d3a407dea c/snap-repair,o/hookstate,o/snapstate: replace errtracker usage with TODO comments 2023-10-09 16:00:35 +02:00
Andrew Phelps
a74c539a9c many: remove usage of the error tracker 2023-10-09 16:00:35 +02:00
Zeyad Gouda
810f908a05 o/snapstate: reset request record per test case in TestUpdateManyRevOptsOrder
Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com>
2023-10-09 15:57:36 +02:00
Zeyad Gouda
e5866c4f8d o/snapstate: fix misalignment in RevisionOptions when requesting refresh candidates
RevisionOptions are mapped to snap names based on order, but the names where
being sorted before the mapping is built.

Test is added trying all permutation of a few snaps to make sure no regression
happens due to bad ordering.

Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com>
2023-10-09 15:57:36 +02:00
Andrew Phelps
387d297407 c/snap-repair: make snap-repair respect store.offline configurable 2023-10-09 15:55:42 +02:00
Samuele Pedroni
5a0418459d interfaces: review and extend README.md (#13247)
incorporate into it and update the patterns described in basedeclaration.go

have a few relevant doc comments point to it

* tweaks

* interfaces: incorporate suggestions from @degville with some tweaks

thanks

* interfaces: incorporate fixes from @MiguelPires

thanks
2023-10-09 15:43:15 +02:00
Sergio Cazzolato
031a0935db tests: first part of the improvements done for pkg management (#12869)
* First part of the improvements done for pkg management

The idea of this change is to use the tests.pkg tools instead of the
pkgdb.sh helper when possible

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 1c8efb77e1..c82afb2dee

c82afb2dee Support --no-install-recommends parameter when installing dependencies with tests.pkgs
b84eea92e2 spread-shellcheck: fix quotes in environment variables (#41)
ab1e51c29f New comparison in os-query for core systems (#40)
e5ae22a5d4 systemd units can be overwritten
63540b845a Fix error messages in remote pull and push
75e8a426a5 make sure the unit is removed in tests.systemd test
9089ff5c02 Update tests to use the new tests.systemd stop-unit
44ecd5e56a Move tests.systemd stop-units to stop-unit
01a2a83b4b Update tests.systemd to have stop units as systemd.sh
162e93bd35 update tests.systemd CLI options to be the same than retry command
14aa43a405 new feature to re-run failed spread tests (#39)
604cb782db Fix shellcheck in systemd tool
bfc71082c8 Update the tests.systemd to allow parameters waiting for service status
8a2d0a99df Adding quiet tool and removing set +-x from tests.pkgs
d90935d2a4 A comment explaining about the default values for wait-for
3232c5dba7 Add support for ubuntu 23.04
a7164fba07 remove fedora 35 support, add fedora 37 support
89b9eb5301 Update systems supported
92bb6a0664 Include snap-sufix in the snaps.name tool

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: c82afb2dee93a6f2ee047608f0e27d3c4af10a88

* defer tests.pkgs remove inotify-tools

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from c82afb2dee..5e7b63883d

5e7b63883d Fixes for osquery and tests pkgs (#43)
4c9145e2ac support reboot waiting for auto-refresh
45768f5188 show changes in unknown status after refresh
8013c30c2a Remove support for ubuntu 22.10
b32b80bf54 Fix remote.rait-for test in bionic
5675c625e9 Enable fedora 38
55f4471957 Support for new oss
f2e88b357c New tool used to query spread json reports
cacd35ede0 utils/spread-shellcheck: explain disabled warnings (#42)

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 5e7b63883df49cdc72e2fc1fe0a23dd79224ab27

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 5e7b63883d..2a5c4414a3

2a5c4414a3 fix shellcheck errors

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 2a5c4414a3db1ec8f8e37ee78d7d3c5b5b7a082b
2023-10-09 08:37:21 -03:00
Andrew Phelps
10e38932ea o/devicestate: use device-service.access to determine if we should fetch a serial or not (#13233)
* o/devicestate: use device-service.access to determine if we should fetch a serial or not

* o/devicestate: remove checks for device serial

* o/devicestate: convert error return into a log message

* o/devicestate: removed accidentally stash popped changes

* o/devicestate: removed unused type

* o/devicestate: sort tasks for test consistency

* o/devicestate: log message when skipping getting serial

* o/devicestate: examine tasks on change in test rather than directly on the state

* o/devicestate: examine tasks on change in test rather than directly on the state

* o/devicestate: convert empty len check to nil change check

* o/devicestate: fix typo

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* o/devicestate: add testcase number to test output

---------

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>
2023-10-06 10:29:11 -04:00
Philip Meulengracht
33aefb22e5 o/restart,o/devicestate: default to tasks being restart-boundaries if no restart-boundaries have been configured.
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.
2023-10-06 14:51:35 +02:00
Valentin David
d50dbc0cf4 tests/nested/manual/snapd-refresh-from-old: also test refresh to current
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.
2023-10-06 14:51:35 +02:00
Andrew Phelps
6ce8b9c0e7 i/builtin: update gpio apparmor to match pattern that contains multiple subdirectories under /sys/devices/platform 2023-10-06 13:54:35 +02:00
Philip Meulengracht
11e0166f1c tests/nested/manual: correct some reboot messages after reboot code changes 2023-10-06 12:14:02 +02:00