mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
core: add debug log when a job in the activation queue is not runnable
When a job is skipped due its dependencies not being ready, log a debug message saying what is holding it back. This was very useful with transient units timing out to figure out where the problem was.
This commit is contained in:
parent
c5bc2c01ee
commit
c03fbd37d6
@ -516,12 +516,20 @@ static bool job_is_runnable(Job *j) {
|
||||
return true;
|
||||
|
||||
HASHMAP_FOREACH_KEY(v, other, j->unit->dependencies[UNIT_AFTER], i)
|
||||
if (other->job && job_compare(j, other->job, UNIT_AFTER) > 0)
|
||||
if (other->job && job_compare(j, other->job, UNIT_AFTER) > 0) {
|
||||
log_unit_debug(j->unit,
|
||||
"starting held back, waiting for: %s",
|
||||
other->id);
|
||||
return false;
|
||||
}
|
||||
|
||||
HASHMAP_FOREACH_KEY(v, other, j->unit->dependencies[UNIT_BEFORE], i)
|
||||
if (other->job && job_compare(j, other->job, UNIT_BEFORE) > 0)
|
||||
if (other->job && job_compare(j, other->job, UNIT_BEFORE) > 0) {
|
||||
log_unit_debug(j->unit,
|
||||
"stopping held back, waiting for: %s",
|
||||
other->id);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user