Add RandomizedDelaySec to cloudflared-update.timer - #1701
Open
RajeshRajendiran wants to merge 1 commit into
Open
Add RandomizedDelaySec to cloudflared-update.timer#1701RajeshRajendiran wants to merge 1 commit into
RajeshRajendiran wants to merge 1 commit into
Conversation
Fleets running multiple cloudflared instances for HA failover all pull updates and restart at the same instant, since OnCalendar=daily fires at exactly 00:00:00. Add a 12h randomized delay (and Persistent=true to still catch missed runs) to the generated systemd timer so replicas update at staggered times instead of simultaneously. Fixes cloudflare#1645
RajeshRajendiran
force-pushed
the
add-randomized-delay-update-timer
branch
from
July 26, 2026 06:59
2d0c6b7 to
6bb3fb1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RandomizedDelaySec=12handPersistent=trueto the generatedcloudflared-update.timersystemd unit.OnCalendar=dailyfires every replica at exactly00:00:00, so fleets running multiplecloudflaredinstances for HA failover all pull the update and restart at the same instant, causing a brief total outage instead of a staggered rollout.Test plan
go build ./cmd/cloudflared/...go test -race ./cmd/cloudflared/...gofmt -l/go vet ./cmd/cloudflared/...make lint(golangci-lint in this sandbox is built against an older Go toolchain than this repo'sgo 1.26and refuses to run; CI should cover this)Fixes #1645