← Back to issue list

udev interface fails in privileged containers

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1712808
Type
issue
State
open
Author
~saviq
Labels
verification-done-noble verification-done-plucky verification-done-questing verification-needed verification-needed-jammy
Created
Updated
Closed

Current evaluation

snapd fails to reload udev rules when installing snaps in privileged LXD containers (no udevd running). Fixed in snapd 2.68.5; verification done for noble/plucky/questing, jammy verification still pending.

Suggested action: keep open

Reason: The fix landed in snapd 2.68.5 (SRU bug 2098137) and the issue is actively triaged with verification labels: verification-done for noble, plucky, and questing, but verification-needed-jammy remains, so it must stay open until jammy is verified. Last activity was ~7 months ago, so it's moderately stale but clearly still relevant and not a candidate for closing.

Impact: 50 Quick Win: 30.0 Staleness: 55 Complexity: 40 Confidence: 75 Support Request: 10

Issue body

[SRU] 2.68.5: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2098137 [ Impact ] Error containing "cannot reload udev rules: exit status X" when doing an actions e.g. installation of hello-world on a privileged container. [ Test Plan ] 1. Produce error with snapd 2.67.1+25.04 deb (inside the lxd container) snap install lxd --channel=5.21/stable lxd init (use defaults) lxc launch -c security.privileged=true ubuntu:24.04 test lxc exec test -- bash snap install hello-world expect to see error ``` error: cannot perform the following tasks: - Setup snap "snapd" (24792) security profiles (cannot reload udev rules: exit status 1 udev output: Failed to send reload request: No such file or directory ) ``` 2. Change to snapd 2.68.5 deb (inside the lxd container) lxc exec test -- bash Moify /etc/apt/sources.list.d/ubuntu.sources: add <release>-proposed sudo apt update apt install snapd=2.68.5+ubuntu<release>.<iteration> e.g. apt install snapd=2.68.5+ubuntu25.04.2 snap install hello-world do not expect to see the error anymore ``` snap install hello-world 2025-08-01T18:49:01Z INFO Waiting for automatic snapd restart... hello-world 6.4 from Canonical✓ installed ``` Repeat for all targeted Ubuntu releases. ---original--- I think this is possibly a known issue since there's evidence of a workaround in e.g. https://stgraber.org/2017/01/13/kubernetes-inside-lxd/, but I couldn't find any proper discussion of it. Installing snaps in a privileged LXD container fails. Here's a test script:   $ lxc launch -c security.privileged=true ubuntu:16.04 snap-test   $ lxc exec snap-test apt update   $ lxc exec snap-test apt install squashfuse   $ lxc exec snap-test snap install hello-world   2017-08-24T12:03:59Z INFO cannot auto connect core:core-support-plug to core:core-support: (slot auto-connection), existing connection state "core:core-support-plug core:core-support" in the way   error: cannot perform the following tasks:   - Setup snap "core" (2462) security profiles (cannot setup udev for snap "core": cannot reload udev rules: exit status 2   udev output:   )   - Setup snap "core" (2462) security profiles (cannot reload udev rules: exit status 2   udev output:   ) This is because /sys is mounted read-only in privileged containers (presumably to avoid causing havoc to the host) and so the systemd-udevd service isn't started. The prevailing recommendation seems to be to work around it by making /usr/local/bin/udevadm be a symlink to /bin/true, but this looks like a hack rather than a proper fix.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 50
Quick Win: 30.0
Staleness: 55
Complexity: 40
Confidence: 75
Support Request: 10
keep open snapd fails to reload udev rules when installing snaps in privileged LXD containers (no udevd running). Fixed in snapd 2.68.5; verification done for noble/plucky/questing, jammy verification still pending.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 20
Confidence: 75
Support Request: 5
needs triage SRU fix for snapd udev reload failure in privileged LXD containers. Verified for newer releases, but jammy verification remains pending after ~9 years.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 25
Confidence: 90
Support Request: 5
close stale Bug in snapd where udev rule reloading fails in privileged LXD containers due to read-only /sys. Marked verification-done for multiple Ubuntu releases, indicating a fix was implemented and verified in snapd 2.68.5. Issue remains open but resolved.
qwen3.6-35b-a3b-mtp-q6
Staleness: 35
Complexity: 20
Confidence: 85
Support Request: 5
needs triage SRU for snapd 2.68.5 fixing udev reload failures when installing snaps in privileged LXD containers. Verification labels exist for multiple releases, but no maintainer comments or assignee visible.
qwen3.6-35b-moe-q4
Staleness: 98
Complexity: 25
Confidence: 95
Support Request: 5
close stale Fix for udev reload failures in privileged LXD containers was implemented in snapd 2.68.5 and verified across multiple Ubuntu releases. The reported behavior is no longer reproducible with updated snapd versions.

Update history

No update history recorded yet.

Related work

  • Related To: ubuntu/+source/snapd#2098137 (confidence 80%)

    SRU tracking bug for the snapd 2.68.5 fix referenced in the issue's test plan; verification of that SRU across releases is what keeps this bug open.

Related issues

No related issues found above the similarity threshold.