Skip to content

Commit

Permalink
openshift-azure-routes: Avoid synchronizing too quickly
Browse files Browse the repository at this point in the history
Rapid file changes triggering the path unit can start the
service here frequently, and then this can cause the start
limit to be hit, and then systemd will refuse further
activations (unless we bumped the limit).

I don't think we need to synchronize the iptables
rules more than once every 3 seconds.
  • Loading branch information
cgwalters committed Mar 8, 2023
1 parent 8728c7c commit d47101b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ contents:
remove_stale
add_rules
echo "done applying vip rules"
# Arbitrary delay to avoid synchronizing too quickly on file changes; the VIP
# file could change multiple times quickly, but we don't need to react instantly
# to every change. Most crucially we want to be sure we don't trip over the
# default systemd StartLimitBurst/StartLimitIterval settings which are 5 and 10s
# respectively.
sleep 3
;;
cleanup)
clear_rules
Expand Down

0 comments on commit d47101b

Please sign in to comment.