Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/lib/tools/tests.invariant: look for unexpected snap cgroups #15145

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bboozzoo
Copy link
Contributor

@bboozzoo bboozzoo commented Feb 27, 2025

Snap cgroups should be cleaned up as a result of removing the snaps during restore.

Related: SNAPDENG-34419
Thanks for helping us make a better snapd!
Have you signed the license agreement and read the contribution guide?

Snap cgroups should be cleaned up as a result of removing the snaps
during restore.

Signed-off-by: Maciej Borzecki <[email protected]>
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.06%. Comparing base (a272aac) to head (38f1a75).
Report is 74 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #15145      +/-   ##
==========================================
- Coverage   78.07%   78.06%   -0.01%     
==========================================
  Files        1182     1184       +2     
  Lines      157743   158251     +508     
==========================================
+ Hits       123154   123540     +386     
- Misses      26943    27030      +87     
- Partials     7646     7681      +35     
Flag Coverage Δ
unittests 78.06% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

n="$1" # invariant name
find /sys/fs/cgroup -type d -name 'snap.*' -ls > "$TESTSTMP/tests.invariant.$n"
if [ -s "$TESTSTMP/tests.invariant.$n" ]; then
echo "tests.invariant: leftover cgroup scope files" >&2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "tests.invariant: leftover cgroup scope files" >&2
echo "tests.invariant: leftover snap cgroups" >&2

Copy link

Thu Feb 27 12:05:25 UTC 2025
The following results are from: https://github.com/canonical/snapd/actions/runs/13563527827

Failures:

Preparing:

  • google-core:ubuntu-core-18-64:tests/main/lxd:snapd_cgroup_just_inside
  • google-core:ubuntu-core-18-64:tests/main/lxd:snapd_cgroup_just_outside
  • google-core:ubuntu-core-18-64:tests/main/lxd:snapd_cgroup_both
  • google-core:ubuntu-core-18-64:tests/main/degraded
  • google-core:ubuntu-core-18-64:tests/main/interfaces-broadcom-asic-control
  • google-core:ubuntu-core-18-64:tests/main/lxd:snapd_cgroup_neither
  • google-core:ubuntu-core-20-64:tests/main/lxd:snapd_cgroup_just_inside
  • google-core:ubuntu-core-20-64:tests/core/reboot
  • google-core:ubuntu-core-20-64:tests/main/lxd:snapd_cgroup_just_outside
  • google-core:ubuntu-core-20-64:tests/main/lxd:snapd_cgroup_both
  • google-core:ubuntu-core-20-64:tests/main/lxd:snapd_cgroup_neither
  • google-core:ubuntu-core-20-64:tests/main/interfaces-many-core-provided
  • google-core:ubuntu-core-20-64:tests/main/interfaces-broadcom-asic-control
  • google-core:ubuntu-core-20-64:tests/main/degraded

Executing:

  • google:ubuntu-20.04-64:tests/unit/go:clang

Restoring:

  • google-distro-1:debian-11-64:tests/main/services-snapctl
  • google-distro-1:debian-11-64:tests/main/snap-quota-thread
  • google-distro-1:debian-11-64:tests/main/snap-mgmt
  • google-distro-1:debian-11-64:tests/main/systemd-service
  • google-distro-1:debian-11-64:tests/main/snap-services
  • google-distro-1:debian-11-64:tests/main/parallel-install-services
  • openstack:fedora-41-64:tests/main/services-refresh-mode
  • openstack:fedora-41-64:tests/main/try-snap-goes-away:test_snapd_service
  • openstack:fedora-41-64:tests/main/systemd-service
  • openstack:fedora-41-64:tests/main/snap-user-service-upgrade-failure
  • openstack:fedora-41-64:tests/main/snap-mgmt
  • openstack:fedora-41-64:tests/main/selinux-clean
  • google-core:ubuntu-core-18-64:tests/main/lxd:snapd_cgroup_just_inside
  • google-core:ubuntu-core-18-64:tests/main/lxd:snapd_cgroup_just_outside
  • google-core:ubuntu-core-18-64:tests/main/lxd:snapd_cgroup_both
  • google-core:ubuntu-core-18-64:tests/main/degraded
  • google-core:ubuntu-core-18-64:tests/main/interfaces-broadcom-asic-control
  • google-core:ubuntu-core-18-64:tests/main/lxd:snapd_cgroup_neither
  • google-core:ubuntu-core-20-64:tests/main/lxd:snapd_cgroup_just_inside
  • google-core:ubuntu-core-20-64:tests/core/reboot
  • google-core:ubuntu-core-20-64:tests/main/lxd:snapd_cgroup_just_outside
  • google-core:ubuntu-core-20-64:tests/main/lxd:snapd_cgroup_both
  • google-core:ubuntu-core-20-64:tests/main/lxd:snapd_cgroup_neither
  • google-core:ubuntu-core-20-64:tests/main/interfaces-many-core-provided
  • google-core:ubuntu-core-20-64:tests/main/interfaces-broadcom-asic-control
  • google-core:ubuntu-core-20-64:tests/main/degraded
  • google-core:ubuntu-core-24-64:tests/core/reboot
  • google-core:ubuntu-core-24-64:tests/main/services-refresh-mode
  • google-core:ubuntu-core-24-64:tests/main/parallel-install-services
  • google-core:ubuntu-core-24-64:tests/main/services-stop-mode
  • google-core:ubuntu-core-24-64:tests/main/snap-quota-memory
  • google-core:ubuntu-core-24-64:tests/main/systemd-service
  • google-core:ubuntu-core-24-64:tests/main/try-snap-goes-away:test_snapd_service
  • google-core:ubuntu-core-24-64:tests/main/snap-service
  • google:ubuntu-20.04-64:tests/main/lxd-postrm-purge
  • google:ubuntu-20.04-64:tests/main/lxd:snapd_cgroup_both
  • google:ubuntu-20.04-64:tests/main/lxd:snapd_cgroup_neither
  • google:ubuntu-20.04-64:tests/main/lxd:snapd_cgroup_just_outside
  • google:ubuntu-20.04-64:tests/main/lxd:snapd_cgroup_just_inside
  • google:ubuntu-20.04-64:tests/main/interfaces-broadcom-asic-control
  • google:ubuntu-20.04-64:tests/main/interfaces-many-snap-provided
  • google:ubuntu-20.04-64:tests/main/snapd-snap:lxd
  • google:ubuntu-24.10-64:tests/main/snap-service
  • google:ubuntu-24.10-64:tests/main/apparmor-prompting-snapd-startup
  • google:ubuntu-24.10-64:tests/main/snap-user-service-restart-on-upgrade
  • google:ubuntu-24.10-64:tests/main/services-snapctl
  • google:ubuntu-24.10-64:tests/main/apparmor-prompting-flag-restart
  • google:ubuntu-24.10-64:tests/main/snap-logs
  • google:ubuntu-24.10-64:tests/main/snap-services
  • google:ubuntu-24.10-64:tests/main/try-snap-goes-away:test_snapd_service
  • google:ubuntu-24.04-64:tests/main/snap-user-services-mixed-refresh-single-disabled
  • google:ubuntu-24.04-64:tests/main/snap-services
  • google:ubuntu-24.04-64:tests/main/snap-service
  • google:ubuntu-24.04-64:tests/main/snapd-update-services
  • google:ubuntu-24.04-64:tests/main/systemd-service
  • google:ubuntu-24.04-64:tests/main/interfaces-requests-activates-handlers
  • google:ubuntu-24.04-64:tests/main/snap-mgmt
  • google:ubuntu-24.04-64:tests/main/snap-logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants