Uphold/StopWhenUnneeded/BindsTo: requeue when job finishes

When a unit is upheld and fails, and there are no state changes in
the upholder, it will not be retried, which is against what the
documentation suggests.

Requeue when the job finishes. Same for the other two queues.
This commit is contained in:
Luca Boccassi
2023-04-13 13:28:25 +01:00
parent 7223d500ac
commit 4c7a0fc8d0
5 changed files with 59 additions and 0 deletions
+6
View File
@@ -1051,6 +1051,12 @@ finish:
job_add_to_gc_queue(other->job);
}
/* Ensure that when an upheld/unneeded/bound unit activation job fails we requeue it, if it still
* necessary. If there are no state changes in the triggerer, it would not be retried otherwise. */
unit_submit_to_start_when_upheld_queue(u);
unit_submit_to_stop_when_bound_queue(u);
unit_submit_to_stop_when_unneeded_queue(u);
manager_check_finished(u->manager);
return 0;