Workaround issue starting 22.04 containers on recent kernels#519
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a workaround for Launchpad bug #2127244, which prevents Ubuntu 22.04 containers from starting on recent kernels due to an AppArmor issue in snapd. The workaround patches the snap-confine AppArmor profile in newly launched 22.04 containers to allow access to /run/systemd/journal/stdout.
Key Changes
- Added AppArmor profile patching for Ubuntu 22.04 containers after launch
- Embedded both old and new versions of the snap-confine AppArmor profile for comparison
- Modified launch workflow to apply patches automatically
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/workshop/lxd/snap-confine.old | Embedded original AppArmor profile from snapd 2.71 for comparison |
| internal/workshop/lxd/snap-confine.new | Embedded patched AppArmor profile with stdout access permission |
| internal/workshop/lxd/lxd_backend.go | Added patchInstance function to detect and apply AppArmor profile fix for 22.04 containers |
dmitry-lyfar
approved these changes
Oct 21, 2025
TICS Quality Gate✔️ PassedworkshopAll conditions passedSee the results in the TICS Viewer The following files have been checked for this project
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Workaround https://bugs.launchpad.net/snapd/+bug/2127244. See comments for details.
Self-review quick check
Docs
Or: