Skip to content

backup adopt guard ignores the artifact URI, so a changed template orphans the object #4176

Description

The adopt guard in the backup strategy controllers compares the application kind and name of an existing Backup and nothing else. artifactURITemplate is not part of the comparison.

The window: two runs share a BackupJob name, and the artifact URI template changed between them. The controller adopts the existing Backup, which keeps the status.artifact.uri and client image recorded on the earlier run, while the Job it launches writes to the new key. Every consumer then reads the stale record. A restore fetches the old object, cleanup deletes the old object, and the object the Job actually wrote stays in the bucket with nothing referencing it.

The same guard shape sits in internal/backupcontroller/rabbitmqstrategy_controller.go around lines 507-518, so this is on main today rather than something a pending PR introduces. It came up while reviewing #4000, whose Kafka driver copies that guard line for line, and the review carries it as a non-blocking note for that reason.

Fix shape: compare the StrategyRef and the recorded artifact URI before adopting, or treat a mismatch as a name collision and fail the job. Both drivers want the same change in one pass, since the second is a copy of the first.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/backlogGeneral backlog priority. Lower than priority/important-longterm
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
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

    area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)kind/bugCategorizes issue or PR as related to a bugpriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions