Public bug reported:

[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

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "target-units-can-fail.patch"
   
https://bugs.launchpad.net/bugs/1948476/+attachment/5535284/+files/target-units-can-fail.patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, 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:
  New

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


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to