mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 06:03:51 +00:00
unit: When stopping due to BindsTo=, log which unit caused it
I'm trying to track down a relatively recent change in systemd
which broke OSTree; see https://bugzilla.gnome.org/show_bug.cgi?id=743891
Systemd started to stop sysroot.mount, and this patch should help
me debug why at least.
While we're here, "break" on the first unit we find that will
deactivate, as there's no point in further iteration.
(cherry picked from commit 98f738b620)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
fc9805756d
commit
ca0cf2741e
+3
-1
@@ -1648,12 +1648,14 @@ static void unit_check_binds_to(Unit *u) {
|
||||
continue;
|
||||
|
||||
stop = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!stop)
|
||||
return;
|
||||
|
||||
log_unit_info(u->id, "Unit %s is bound to inactive unit. Stopping, too.", u->id);
|
||||
assert(other);
|
||||
log_unit_info(u->id, "Unit %s is bound to inactive unit %s. Stopping, too.", u->id, other->id);
|
||||
|
||||
/* A unit we need to run is gone. Sniff. Let's stop this. */
|
||||
manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user