Backup with --snapshot-move-data completes with zero DataUploads when EnableCSI is off — no upfront validation, and the warning/skip-reason don't name the flag
[!Note] Responses generated with Claude
Not storage-specific. Affects any --snapshot-move-data backup on a server installed without --features=EnableCSI.
Summary
A backup with snapshotMoveData: true on a server without EnableCSI completes as Completed with zero DataUploads. No upfront validation rejects it, and the two operator-facing signals do not name the flag — so the backup looks successful while having moved no volume data.
CSI actions are compiled into the binary and registered by the internal plugin server (pkg/cmd/server/plugin/plugin.go:141-155), but every CSI BIA/RIA is gated:
// pkg/util/csi/util.go:31-33
func ShouldSkipAction(actionName string) bool {
return !features.IsEnabled(velerov1api.CSIFeatureFlag) && strings.Contains(actionName, "velero.io/csi-")
}called from pkg/backup/item_backupper.go:425-430 and pkg/restore/restore.go:1633-1638. The flag is off by default — pkg/cmd/cli/install/install.go:80 declares Features string with a zero value and nothing seeds EnableCSI.
The cause is logged, but not where operators look
pkg/backup/item_backupper.go:427-428 already logs the real reason:
Skip action %s for resource %s:%s/%s, because the CSI feature is not enabled. Feature setting is %s.That is in the backup log at Info level. The gap is that neither operator-facing signal carries it:
- The WARN at
:624-626— "VolumeSnapshotter plugin doesn't support data movement." — is what lands inStatus.Warnings(counted atpkg/controller/backup_controller.go:836). - The skipped-PV reason at
:703-707— "no applicable volumesnapshotter found" — is whatvelero backup describe --detailsshows.
Neither mentions EnableCSI, and the phase stays Completed rather than PartiallyFailed. An operator sees a successful backup and a generic volumesnapshotter warning; the remedy is a server flag they have no pointer to.
There is also no upfront validation: pkg/controller/backup_controller.go:453-455 only defaults SnapshotMoveData, and the validation block at :485-640 never pairs SnapshotMoveData == true with the CSI feature flag.
Real user impact: #8542 (open) carries the same "no applicable volumesnapshotter found" signature with the reporter unable to diagnose it.
Prior art — and the scope limit that makes this not "working as intended"
The gate was introduced deliberately by #6585 / PR #6968. That decision settled only that CSI actions must not run when the flag is off. It never considered the snapshotMoveData: true case, where the result is a Completed backup with zero DataUploads — which is the gap here.
On the flag's future, the position is keep it: reasonerjt on #6585 (2023-09-20) — "Given we are not likely to remove the feature flag, I'm putting this one into v1.13 milestone." This issue does not ask for removal.
(#6694 proposed removal and was closed not_planned by the stale bot carrying the staled label. draghuram's "Keep the flag as is" there was a contributor proposal, partly rejected by reasonerjt on 2023-09-13 on the grounds that packaging the plugin in the binary installer would couple velero and plugin releases.)
Suggested fix
Prefer (2):
- Validate upfront — reject in
prepareBackupRequest(near theSnapshotMoveDatadefaulting atpkg/controller/backup_controller.go:453-455) whenSnapshotMoveDatais true andEnableCSIis not enabled. - Make the cause reach the operator — emit a WARN that explicitly names
EnableCSIat the skip site (pkg/backup/item_backupper.go:425-430, currently Info), and track the PVC/PV viatrackSkippedPVso the reason reaches the skipped-PV summary.
(2) is preferable because it is safe whichever way the flag goes. sseago's never-retracted 3-step plan on #6585 — always enable CSI, let the flag become a no-op, deprecate, remove (the only comment in either thread with a ) — means (1) would build a new hard dependency on a gate maintainers have discussed neutering.
Reproduce
Install velero without --features=EnableCSI, then back up a namespace with CSI PVCs using --snapshot-move-data. Backup reports Completed; velero get datauploads returns nothing; the warning does not name the flag.
Environment
velero main @ 293f6f6a6; still reproduces on upstream/main @ ae6f40c28.
Found during #9714 (Ceph CBT) validation; not storage-specific.
Source: velero-io/velero