summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-09-03 10:04:05 +0200
committerGitHub <noreply@github.com>2019-09-03 10:04:05 +0200
commit74e6a7822101a49faf322f8ecf1b34c738841474 (patch)
treef735549cbadcecb92577e0165bbbd7791e0292eb
parent471cffcfb0e005b7c4044b3b52cc4f25d217efac (diff)
parent5af6aa58aaf537fef8be32c03a02e0a20a83875d (diff)
downloadsystemd-74e6a7822101a49faf322f8ecf1b34c738841474.tar.gz
Merge pull request #13440 from keszybz/failing-condtion-check
Revert "core: check start limit on condition checks too"
-rw-r--r--src/core/unit.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index a2944cbc15..64eb12733a 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1751,7 +1751,6 @@ static bool unit_verify_deps(Unit *u) {
int unit_start(Unit *u) {
UnitActiveState state;
Unit *following;
- int r;
assert(u);
@@ -1776,25 +1775,8 @@ int unit_start(Unit *u) {
* still be useful to speed up activation in case there is some hold-off time, but we don't want to
* recheck the condition in that case. */
if (state != UNIT_ACTIVATING &&
- !unit_test_condition(u)) {
-
- /* Let's also check the start limit here. Normally, the start limit is only checked by the
- * .start() method of the unit type after it did some additional checks verifying everything
- * is in order (so that those other checks can propagate errors properly). However, if a
- * condition check doesn't hold we don't get that far but we should still ensure we are not
- * called in a tight loop without a rate limit check enforced, hence do the check here. Note
- * that ECOMM is generally not a reason for a job to fail, unlike most other errors here,
- * hence the chance is big that any triggering unit for us will trigger us again. Note this
- * condition check is a bit different from the condition check inside the per-unit .start()
- * function, as this one will not change the unit's state in any way (and we shouldn't here,
- * after all the condition failed). */
-
- r = unit_test_start_limit(u);
- if (r < 0)
- return r;
-
+ !unit_test_condition(u))
return log_unit_debug_errno(u, SYNTHETIC_ERRNO(ECOMM), "Starting requested but condition failed. Not starting unit.");
- }
/* If the asserts failed, fail the entire job */
if (state != UNIT_ACTIVATING &&