Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A acpid
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • DebianDebian
  • acpid
  • Merge requests
  • !3

Avoid endless loops when inside a container

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon Deziel requested to merge sdeziel-guest/acpid:dont-run-inside-container into master Jun 08, 2022
  • Overview 1
  • Commits 1
  • Pipelines 1
  • Changes 2

Having acpid.path monitor /etc/acpi/events with inotify to then trigger acpid.service that is not runnable inside a container causes an endless loop that causes a log flood:

# journalctl -fu acpid.service
...
systemd[1]: Condition check resulted in ACPI event daemon being skipped.

A similar issue occurs when acpid.socket receives a connection inside a container. This can be simulated with nc -U /run/acpid.socket which causes the following failure:

# systemctl status acpid.socket
× acpid.socket - ACPID Listen Socket
     Loaded: loaded (/lib/systemd/system/acpid.socket; enabled; vendor preset: enabled)
     Active: failed (Result: trigger-limit-hit) since Wed 2022-06-08 00:05:20 UTC; 27s ago
   Triggers: ● acpid.service
     Listen: /run/acpid.socket (Stream)

Jun 07 23:42:11 jammy-ctn systemd[1]: Listening on ACPID Listen Socket.
Jun 08 00:05:20 jammy-ctn systemd[1]: acpid.socket: Trigger limit hit, refusing further activation.
Jun 08 00:05:20 jammy-ctn systemd[1]: acpid.socket: Failed with result 'trigger-limit-hit'.

Fortunately, with acpid.socket, the unit hits a limit instead of causing an endless loop.

This problem was initially reported here (https://discuss.linuxcontainers.org/t/odd-behavior-with-ubuntu-22-04-and-lxd-22-04-containers/14275/7) and then here (https://bugs.launchpad.net/ubuntu/+source/acpid/+bug/1977896).

The proposed fix is to add ConditionVirtualization=!container to both acpid.path and acpid.socket same as what was done to acpid.service before.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: dont-run-inside-container