mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 22:05:25 +00:00
@@ -1950,10 +1950,14 @@ func hasCSIVolumeSnapshot(ctx *restoreContext, unstructuredPV *unstructured.Unst
|
||||
ctx.log.WithError(err).Warnf("Unable to convert PV from unstructured to structured")
|
||||
return false
|
||||
}
|
||||
// ignoring static PV cases where there is no claimRef
|
||||
if pv.Spec.ClaimRef == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, vs := range ctx.csiVolumeSnapshots {
|
||||
// In some error cases, the VSs' source PVC could be nil or PVs ClaimRef could be nil. Skip them.
|
||||
if vs.Spec.Source.PersistentVolumeClaimName == nil || pv.Spec.ClaimRef == nil {
|
||||
// In some error cases, the VSs' source PVC could be nil. Skip them.
|
||||
if vs.Spec.Source.PersistentVolumeClaimName == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user