2015-03-03 18:52:08 +00:00
|
|
|
From ca0cf2741ef9db81141f4444ab58dd3552c8fb1f Mon Sep 17 00:00:00 2001
|
2015-02-24 22:37:22 +00:00
|
|
|
From: Colin Walters <walters@verbum.org>
|
2015-03-03 18:52:08 +00:00
|
|
|
Date: Tue, 17 Feb 2015 13:47:34 -0500
|
2015-02-24 22:37:22 +00:00
|
|
|
Subject: [PATCH] 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.
|
2015-03-03 18:52:08 +00:00
|
|
|
|
|
|
|
(cherry picked from commit 98f738b62047229af4a929d7996e2ab04253b02c)
|
2015-02-24 22:37:22 +00:00
|
|
|
---
|
2015-03-03 18:52:08 +00:00
|
|
|
src/core/unit.c | 4 +++-
|
|
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
2015-02-24 22:37:22 +00:00
|
|
|
|
|
|
|
diff --git a/src/core/unit.c b/src/core/unit.c
|
2015-03-03 18:52:08 +00:00
|
|
|
index 9f1e55e2f1..563f6fe850 100644
|
2015-02-24 22:37:22 +00:00
|
|
|
--- a/src/core/unit.c
|
|
|
|
+++ b/src/core/unit.c
|
2015-03-03 18:52:08 +00:00
|
|
|
@@ -1648,12 +1648,14 @@ static void unit_check_binds_to(Unit *u) {
|
2015-02-24 22:37:22 +00:00
|
|
|
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);
|