[Bug 1948476] Re: [SRU] Allow target units to fail

Lukas Märdian 1948476 at bugs.launchpad.net
Fri Nov 5 11:39:06 UTC 2021


Thank you Alfonso, I staged this patch for the next Focal SRU:
https://git.launchpad.net/~ubuntu-core-
dev/ubuntu/+source/systemd/commit/?h=ubuntu-
focal&id=fe0cb0bd66baea89d8bbe47cb47d88540f46d470

** Changed in: systemd (Ubuntu)
       Status: New => Invalid

** Changed in: systemd (Ubuntu Focal)
       Status: New => In Progress

** Changed in: systemd (Ubuntu)
       Status: Invalid => Fix Released

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

Title:
  [SRU] Allow target units to fail

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Focal:
  In Progress

Bug description:
  [Impact]

  A systemd regression in focal made it think that target units cannot
  fail, which produced warnings like:

  emergency.target: Requested dependency OnFailure=reboot.target ignored
  (target units cannot fail).

  So the OnFailure settings are ignored for targets (see
  https://github.com/snapcore/core-initrd/issues/33 for details).
  Upstream fixed the issue in v246:
  https://github.com/systemd/systemd/commit/94d1ddbd7cd15b1073757eb5ae0645c83f0b414c

  [Test Plan]

  Test on a UC system and check that the above warnings are not shown
  anymore. Check that when a target service type fails, the OnFailure
  setting is used and the mentioned service is run.

  [Where problems could occur]

  Issues might happen if some target has an OnFailure setting that was
  never run in the past because of this bug, and the behavior is not
  really right because it was never tested. However, OnFailure is not
  used that much on 20.04 in target services:

  /lib/systemd $ find . -name \*.target | xargs grep OnFailure
  /lib/systemd $ 
  /etc/systemd $ find . -name \*.target | xargs grep OnFailure
  /etc/systemd $ 

  I've seen it only in emergency.target for UC20.

  [Other Info]
   
  None

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




More information about the foundations-bugs mailing list