[Bug 1977896] Re: [SRU] Log flood when installing acpid and acpi-support inside a 22.04 container

Luís Infante da Câmara 1977896 at bugs.launchpad.net
Sat Sep 2 15:10:08 UTC 2023


** Description changed:

- # Steps to reproduce
+ [Impact]
+ The acpid.service unit contains `ConditionVirtualization=!container` but something keeps asking systemd to start the acpid service which is not possible due to the unmet condition (!container).
  
- 1) Create a Jammy container
+ The acpid.path unit contains `DirectoryNotEmpty=/etc/acpi/events/`
+ meaning that it uses inotify to trigger the acpid.service which is
+ probably what's causing the endless loop.
+ 
+ This SRU fixes this by adding `ConditionVirtualization=!container` to
+ acpid.path and acpid.socket, that is listed in the Requires of
+ acpid.service.
+ 
+ [Test Plan]
+ 1) Create Jammy and Focal containers
  lxc launch ubuntu:22.04 jammy-ctn
- 2) Install acpid and acpi-support in the container
+ lxc launch ubuntu:20.04 focal-ctn
+ 2) Install acpid and acpi-support in the Jammy container
  lxc exec jammy-ctn -- apt-get update
  lxc exec jammy-ctn -- apt-get install -Vy acpid acpi-support
  3) Check the logs while apt is stalled at "Setting up acpi-support"
  lxc exec jammy-ctn -- journalctl -fu acpid.service
+ 4) Stop the Jammy container
+ lxc stop jammy-ctn
+ 5) Install acpid and acpi-support in the Focal container
+ lxc exec jammy-ctn -- apt-get update
+ lxc exec jammy-ctn -- apt-get install -Vy acpid acpi-support
+ 6) Check the logs while apt is stalled at "Setting up acpi-support", if it gets stalled, or after the installation otherwise
+ lxc exec focal-ctn -- journalctl -fu acpid.service
  
- 3) will show a huge flood of:
+ 3) will show a huge flood of, and 6) will show several of:
  
  Jun 07 23:42:50 jammy-ctn systemd[1]: Condition check resulted in ACPI
  event daemon being skipped.
  
  A workaround is to empty /etc/acpi/events with:
  
  lxc exec jammy-ctn -- sh -c 'mv /etc/acpi/events/* /tmp/'
  
- # Initial analysis
- 
- The acpid.service unit contains `ConditionVirtualization=!container` but
- something keeps asking systemd to start the acpid service which is not
- possible due to the unmet condition (!container).
- 
- The acpid.path unit contains `DirectoryNotEmpty=/etc/acpi/events/`
- meaning that it uses inotify to trigger the acpid.service which is
- probably what's causing the endless loop.
+ [Where problems could occur]
+ This could affect non-container environments, such as native Ubuntu machines and Ubuntu VMs.

** Description changed:

  [Impact]
  The acpid.service unit contains `ConditionVirtualization=!container` but something keeps asking systemd to start the acpid service which is not possible due to the unmet condition (!container).
  
  The acpid.path unit contains `DirectoryNotEmpty=/etc/acpi/events/`
  meaning that it uses inotify to trigger the acpid.service which is
  probably what's causing the endless loop.
  
  This SRU fixes this by adding `ConditionVirtualization=!container` to
  acpid.path and acpid.socket, that is listed in the Requires of
  acpid.service.
  
  [Test Plan]
  1) Create Jammy and Focal containers
  lxc launch ubuntu:22.04 jammy-ctn
  lxc launch ubuntu:20.04 focal-ctn
  2) Install acpid and acpi-support in the Jammy container
  lxc exec jammy-ctn -- apt-get update
  lxc exec jammy-ctn -- apt-get install -Vy acpid acpi-support
  3) Check the logs while apt is stalled at "Setting up acpi-support"
  lxc exec jammy-ctn -- journalctl -fu acpid.service
  4) Stop the Jammy container
  lxc stop jammy-ctn
  5) Install acpid and acpi-support in the Focal container
- lxc exec jammy-ctn -- apt-get update
- lxc exec jammy-ctn -- apt-get install -Vy acpid acpi-support
+ lxc exec focal-ctn -- apt-get update
+ lxc exec focal-ctn -- apt-get install -Vy acpid acpi-support
  6) Check the logs while apt is stalled at "Setting up acpi-support", if it gets stalled, or after the installation otherwise
  lxc exec focal-ctn -- journalctl -fu acpid.service
  
  3) will show a huge flood of, and 6) will show several of:
  
  Jun 07 23:42:50 jammy-ctn systemd[1]: Condition check resulted in ACPI
  event daemon being skipped.
  
  A workaround is to empty /etc/acpi/events with:
  
- lxc exec jammy-ctn -- sh -c 'mv /etc/acpi/events/* /tmp/'
+ lxc exec $CONTAINER -- sh -c 'mv /etc/acpi/events/* /tmp/'
  
  [Where problems could occur]
  This could affect non-container environments, such as native Ubuntu machines and Ubuntu VMs.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to acpid in Ubuntu.
https://bugs.launchpad.net/bugs/1977896

Title:
  [SRU] Log flood when installing acpid and acpi-support inside a 22.04
  container

Status in acpid package in Ubuntu:
  Fix Released
Status in acpid package in Debian:
  Fix Released

Bug description:
  [Impact]
  The acpid.service unit contains `ConditionVirtualization=!container` but something keeps asking systemd to start the acpid service which is not possible due to the unmet condition (!container).

  The acpid.path unit contains `DirectoryNotEmpty=/etc/acpi/events/`
  meaning that it uses inotify to trigger the acpid.service which is
  probably what's causing the endless loop.

  This SRU fixes this by adding `ConditionVirtualization=!container` to
  acpid.path and acpid.socket, that is listed in the Requires of
  acpid.service.

  [Test Plan]
  1) Create Jammy and Focal containers
  lxc launch ubuntu:22.04 jammy-ctn
  lxc launch ubuntu:20.04 focal-ctn
  2) Install acpid and acpi-support in the Jammy container
  lxc exec jammy-ctn -- apt-get update
  lxc exec jammy-ctn -- apt-get install -Vy acpid acpi-support
  3) Check the logs while apt is stalled at "Setting up acpi-support"
  lxc exec jammy-ctn -- journalctl -fu acpid.service
  4) Stop the Jammy container
  lxc stop jammy-ctn
  5) Install acpid and acpi-support in the Focal container
  lxc exec focal-ctn -- apt-get update
  lxc exec focal-ctn -- apt-get install -Vy acpid acpi-support
  6) Check the logs while apt is stalled at "Setting up acpi-support", if it gets stalled, or after the installation otherwise
  lxc exec focal-ctn -- journalctl -fu acpid.service

  3) will show a huge flood of, and 6) will show several of:

  Jun 07 23:42:50 jammy-ctn systemd[1]: Condition check resulted in ACPI
  event daemon being skipped.

  A workaround is to empty /etc/acpi/events with:

  lxc exec $CONTAINER -- sh -c 'mv /etc/acpi/events/* /tmp/'

  [Where problems could occur]
  This could affect non-container environments, such as native Ubuntu machines and Ubuntu VMs.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpid/+bug/1977896/+subscriptions




More information about the foundations-bugs mailing list