You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for an existing issue, and could not find anything. I believe this is a new bug.
I have read the troubleshooting guide
I have read the troubleshooting guide and I think this is a new bug.
I am running a supported version of CloudNativePG
I have read the troubleshooting guide and I think this is a new bug.
Contact Details
No response
Version
trunk (main)
What version of Kubernetes are you using?
1.36
What is your Kubernetes environment?
Self-managed: kind (evaluation)
How did you install the operator?
YAML manifest
What happened?
When creating a Backup with method: volumeSnapshot and spec.online: false (a cold backup, requiring instance fencing), the resulting Backup.status.online field incorrectly reports true once the backup completes, even though the backup was correctly executed as cold (the instance was fenced, and the VolumeSnapshot's own cnpg.io/onlineBackup annotation correctly shows "false").
The root cause is in finalizeSnapshotBackupStep — it reads online directly from the cluster-level config and ignores the backup-level spec.online override:
Since cluster.Spec.Backup.VolumeSnapshot has no explicit online field set, GetOnline() defaults to true[1], regardless of what's in backup.Spec.Online.
The codebase already has a helper that correctly merges backup-level overrides with cluster-level config — backup.GetVolumeSnapshotConfiguration(...)[2]. The fix would be to use it here instead of the raw cluster config:
Activity
dosubot commentedon Jul 30, 2026
The root cause is in
finalizeSnapshotBackupStep— it readsonlinedirectly from the cluster-level config and ignores the backup-levelspec.onlineoverride:Since
cluster.Spec.Backup.VolumeSnapshothas no explicitonlinefield set,GetOnline()defaults totrue[1], regardless of what's inbackup.Spec.Online.The codebase already has a helper that correctly merges backup-level overrides with cluster-level config —
backup.GetVolumeSnapshotConfiguration(...)[2]. The fix would be to use it here instead of the raw cluster config:To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
fix(backup): honor Backup `spec.online` when finalizing volume snapshots
fix(backup): honor Backup `spec.online` when finalizing volume snapsh…
fix(backup): honor Backup `spec.online` when finalizing volume snapsh…
fix(backup): honor Backup `spec.online` when finalizing volume snapsh…
fix(backup): honor Backup `spec.online` when finalizing volume snapsh…