[SRU] Allow target units to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
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=
So the OnFailure settings are ignored for targets (see https:/
[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
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= fe0cb0bd66baea8 9d8bbe47cb47d88 540f46d470