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

Graceful shutdown test blocked by AppArmor on newer Ubuntu versions #3178

Open
divergentdave opened this issue May 29, 2024 · 0 comments
Open

Comments

@divergentdave
Copy link
Contributor

I get errors from unshare when running the graceful_shutdown test after upgrading to Ubuntu 24.04. This is happening because Ubuntu is now restricting unprivileged user namespaces by default. I was able to work around this temporarily by running sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0.

The original reason for introducing unshare in this test was to test the function of signal handlers when running as PID 0, since the default SIGTERM handler behaves differently depending on the PID. We could replace the existing integration test with a test that relies on testcontainers, gated behind cargo xtask test-docker. Docker has its own AppArmor profile that allows it to use user namespaces, if running in rootless mode, so we can still get the correct PID in our test setup. Plus, testing a container image is a step closer to what we actually run than testing the executable alone.

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

No branches or pull requests

1 participant