Skip to content

nan-vm-operator: disable backup policy on unknown/orphan instances after repo deletion #145

Open

Description

@sre-helmcode

Follow-up from the security re-review of helmcode/nan-vm-operator#39 (workspace backups, #130).

A stale copy of a VM on a host that is unreachable during repo deletion is not listed, so its backup policy is not turned off. If the runtime row no longer exists, policy convergence never treats it when the host comes back (unknown instance). It could keep taking backups and, since nan-vmd initialises the repo on demand, recreate agents/<uuid>/ in R2 after repo_deleted_at was recorded. Pre-existing gap, not introduced by #39.

Proposed fix: in the backup loop, turn the policy off for any instance whose agent has no runtime row or whose backup row has repo_deleted_at set, and re-run the repo deletion if a repo reappears.

🤖 Generated with Claude Code

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions