Skip to content

fix(deploy): a production deploy fails at its storage check whenever the nightly backup is copying a volume #4784

Closed

Description

@devantler

🤖 Generated by the Agentic Engineer

Expected Behavior

A production deploy that starts while the nightly full backup is running should either wait for the backup's short-lived volumes to go away or ignore them, and then continue. It should fail only when a volume the last storage maintenance recorded is missing or changed.

Actual Behavior

The deploy's storage-maintenance step (go run ./scripts/maintain-longhorn-clients before-publish) compares the live number of Longhorn volumes with the number in the record left by the last maintenance, and stops on any difference:

Longhorn client maintenance HOLD: backing volume inventory changed

The nightly backup creates temporary volumes for its snapshot-based copies. While one exists the count is higher than recorded, so every deploy that reaches this step in that window fails before publishing and its pull request is removed from the merge queue.

Observed on 2026-10-12:

Nothing was published and the recovery job restored main, so the cost is one evicted pull request and about 35 minutes of queue time per occurrence. With the queue as full as it was tonight (eight entries), one entry lands in this window every night.

Steps to Replicate

  1. Have a maintenance record present (longhorn-client-maintenance, phase restored).
  2. Start a production deploy so that its storage-maintenance step runs while a snapshot-based backup copy is in progress.
  3. The step exits 1 with the message above.

Acceptance Criteria

  • A volume that exists only because a backup copy is in progress does not fail the check. Either the check compares the recorded volumes by identity and ignores additional ones it can attribute to a running backup, or the step waits a bounded time for them to disappear.
  • A recorded volume that is missing, replaced or changed in size, engine or source still fails the check as it does today.
  • A test covers both cases with a recorded inventory plus one extra temporary volume.
  • Verified on production: a deploy whose storage step runs during a backup copy completes.

Notes

The comparison is backingFieldsPreserved in scripts/maintain-longhorn-clients/plan.go (len(current) != len(before)). Related: #4723 (why tonight's backup was also incomplete), #4719 and #4775 (where this step was added and repaired).

Activity

  1. added theissue type on Oct 12, 2026
  2. moved this to 📥 Backlog in 🌊 Project Boardon Oct 12, 2026
  3. self-assigned this
    on Oct 12, 2026
  4. devantler commented on Oct 12, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Not building a fix yet: #4744 removes the path that fails

    I traced the failure in run 38194496846 before changing anything.

    • The message comes from the legacy publication guard, not from a maintenance run. main.go enters that guard only while main still declares a non-empty systemManagedComponentsNodeSelector for Longhorn. In that guard, a journal in phase restored is compared with the live cluster by backingFieldsPreserved (interruption.go), which requires the same number of volumes.
    • fix: allow volume clients on compute workers #4744 (in the merge queue now, position 3 at 03:18 UTC) sets that selector to the empty string. Once it is on main, ordinary deploys return from the guard before any inventory comparison, so a backup's temporary volumes can no longer fail them.
    • The deploy of fix: allow volume clients on compute workers #4744 itself runs the real maintenance, which refuses to start while a backup is active. That refusal is intended and is a different check.

    So the next step depends on #4744:

    One more thing the count comparison would do, which I have not seen happen: while the guard is active, any new permanent volume added after the last maintenance would fail every later deploy in the same way, not only during a backup.

    I released my claim on this issue; no branch or pull request exists for it.

  5. removed their assignment
    on Oct 12, 2026
  6. devantler commented on Oct 12, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Resolved by #4744

    #4744 merged and its production deploy succeeded (run 38200854113), including the real Longhorn client maintenance.

    Read back after it:

    • main now declares an empty systemManagedComponentsNodeSelector for Longhorn, and the live Longhorn setting is empty too.
    • The volume-count comparison that removed fix(homepage): remove the two legacy site headings #4770 from the queue is only reached while that selector is non-empty on main, so a deploy can no longer stop there during the nightly backup.

    No code change was needed here. If a later change sets the selector again, the count comparison returns with it; the note above describes the small fix for that case.

  7. devantler commented on Oct 12, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Follow-up evidence: the next deploy after #4744 (run 38204707153, #4768, merged 05:02 UTC) passed all four phases of the storage step, and the live maintenance record is in phase complete. Not yet observed: a deploy whose storage step runs during a backup copy (next chance about 02:18 UTC tonight); reopen if that evicts a deploy again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions