fix(metrics): vmbackup lost a whole cycle to a startup race #26

Merged
sean merged 1 commit from fix/vmbackup-startup-race into trunk 2026-08-10 12:16:13 +00:00
Owner

victoriametrics-0 reported backup FAILED. Not S3, not credentials:

Creating snapshot
fatal cannot create snapshot: Post .../snapshot/create:
      dial tcp4 127.0.0.1:8428: connect: connection refused

Both containers start at the same time, so vmbackup fired before vmsingle was listening - and the loop then slept 6 hours before retrying. One startup race cost a whole backup cycle. Replica 1 only succeeded by timing luck, which is why this looked intermittent.

  • Wait for vmsingle to answer /health before the first backup (busybox wget is already in the image).
  • Retry a failed backup in 5 minutes, not 6 hours. A transient failure must not cost a full cycle.
`victoriametrics-0` reported `backup FAILED`. Not S3, not credentials: ``` Creating snapshot fatal cannot create snapshot: Post .../snapshot/create: dial tcp4 127.0.0.1:8428: connect: connection refused ``` Both containers start at the same time, so vmbackup fired before vmsingle was listening - and the loop then slept **6 hours** before retrying. One startup race cost a whole backup cycle. Replica 1 only succeeded by timing luck, which is why this looked intermittent. - Wait for vmsingle to answer `/health` before the first backup (busybox `wget` is already in the image). - Retry a failed backup in **5 minutes, not 6 hours**. A transient failure must not cost a full cycle.
fix(metrics): vmbackup lost a whole cycle to a startup race
All checks were successful
pipeline/ci CI green @ f23e66293bde
f23e66293b
victoriametrics-0 reported 'backup FAILED'. It was not S3 and not
credentials:

  Creating snapshot
  fatal cannot create snapshot: Post .../snapshot/create:
        dial tcp4 127.0.0.1:8428: connect: connection refused

Both containers start at the same time, so vmbackup fired before
vmsingle was listening. The loop then slept 6 hours before trying
again, so ONE startup race cost a whole backup cycle. Replica 1 only
succeeded by timing luck, which is why this looked intermittent.

Two changes:

Wait for vmsingle to answer /health before the first backup. busybox
wget is already in the image.

Retry a failed backup in 5 minutes instead of 6 hours. A transient
failure must not cost a full cycle.
sean merged commit f23e66293b into trunk 2026-08-10 12:16:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/olly!26
No description provided.