diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2021-08-24 16:46:47 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2021-08-25 13:26:14 +0100 |
commit | 9727f2427ff6b2e1f4ab927cc57ad8e888f04e95 (patch) | |
tree | d145a7fd24306686e49ebed9c9c4c2b53f72a913 /test/testsuite-10.units | |
parent | a243128d1fcfc378df9fce1b4997148a17ef23a5 (diff) | |
download | systemd-9727f2427ff6b2e1f4ab927cc57ad8e888f04e95.tar.gz |
core: Check unit start rate limiting earlier
Fixes #17433. Currently, if any of the validations we do before we
check start rate limiting fail, we can still enter a busy loop as
no rate limiting gets applied. A common occurence of this scenario
is path units triggering a service that fails a condition check.
To fix the issue, we simply move up start rate limiting checks to
be the first thing we do when starting a unit. To achieve this,
we add a new method to the unit vtable and implement it for the
relevant unit types so that we can do the start rate limit checks
earlier on.
Diffstat (limited to 'test/testsuite-10.units')
-rw-r--r-- | test/testsuite-10.units/test10.service | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/testsuite-10.units/test10.service b/test/testsuite-10.units/test10.service index d0be786b01..2fb476b986 100644 --- a/test/testsuite-10.units/test10.service +++ b/test/testsuite-10.units/test10.service @@ -1,6 +1,9 @@ [Unit] Requires=test10.socket ConditionPathExistsGlob=/tmp/nonexistent +# Make sure we hit the socket trigger limit in the test and not the service start limit. +StartLimitInterval=1000 +StartLimitBurst=1000 [Service] ExecStart=true |