Skip to content

Commit b4ef58c

Browse files
mrc0mmandbluca
authored andcommitted
test: reset systemd-resolved.service's restart counter
Otherwise we might occasionally hit the start rate limit, as we restart the service a bunch of times: [ 3702.280886] testsuite-75.sh[1135]: + tee /tmp/tmp.wUL8bkJwrt [ 3702.283684] testsuite-75.sh[1135]: {} [ 3702.284254] testsuite-75.sh[46]: + restart_resolved [ 3702.284302] testsuite-75.sh[46]: + systemctl stop systemd-resolved.service [ 3702.310678] testsuite-75.sh[1140]: + systemctl is-failed systemd-resolved.service [ 3702.316766] testsuite-75.sh[1141]: inactive [ 3702.316998] testsuite-75.sh[46]: + systemctl start systemd-resolved.service [ 3702.322315] systemd[1]: systemd-resolved.service: Start request repeated too quickly. [ 3702.322343] systemd[1]: systemd-resolved.service: Failed with result 'start-limit-hit'. [ 3702.322609] systemd[1]: Failed to start systemd-resolved.service - Network Name Resolution. [ 3702.323619] systemctl[1142]: Job for systemd-resolved.service failed. [ 3702.323839] systemctl[1142]: See "systemctl status systemd-resolved.service" and "journalctl -xeu systemd-resolved.service" for details. [ 3702.325035] systemd[1]: testsuite-75.service: Failed with result 'exit-code'. [ 3702.325391] systemd[1]: Failed to start testsuite-75.service - Tests for systemd-resolved. Follow-up for b1384db and 6ef512c. (cherry picked from commit 68785c7) (cherry picked from commit 5cd1792)
1 parent bb4eef8 commit b4ef58c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/units/testsuite-75.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ monitor_check_rr() (
4646
restart_resolved() {
4747
systemctl stop systemd-resolved.service
4848
(! systemctl is-failed systemd-resolved.service)
49+
# Reset the restart counter since we call this method a bunch of times
50+
# and can occasionally hit the default rate limit
51+
systemctl reset-failed systemd-resolved.service
4952
systemctl start systemd-resolved.service
5053
systemctl service-log-level systemd-resolved.service debug
5154
}

0 commit comments

Comments
 (0)