KDMP: Before starting a restore check if destination PVC is in Bound state.
Check for both pvc.Spec.VolumeName is not empty and the PVC status is in Bound state.
@@ -511,7 +511,7 @@ func (k *kdmp) StartRestore(
if err != nil {
return false, nil
}
- if pvc.Spec.VolumeName == "" {
+ if pvc.Spec.VolumeName == "" || pvc.Status.Phase != v1.ClaimBound {
return false, nil
}
volumeInfo.RestoreVolume = pvc.Spec.VolumeName
