bug fix: save PVBs even if no snapshot was taken

Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
Steve Kriss
2020-04-02 13:17:41 -06:00
parent 969526cee5
commit 91228522be
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -174,9 +174,6 @@ ForEachVolume:
case res := <-resultsChan:
switch res.Status.Phase {
case velerov1api.PodVolumeBackupPhaseCompleted:
if res.Status.SnapshotID == "" { // when the volume is empty there is no restic snapshot, so best to exclude it
break
}
podVolumeBackups = append(podVolumeBackups, res)
case velerov1api.PodVolumeBackupPhaseFailed:
errs = append(errs, errors.Errorf("pod volume backup failed: %s", res.Status.Message))
+1 -1
View File
@@ -1025,7 +1025,7 @@ func (ctx *context) restoreItem(obj *unstructured.Unstructured, groupResource sc
}
if pvc.Spec.VolumeName != "" && ctx.pvsToProvision.Has(pvc.Spec.VolumeName) {
ctx.log.Infof("Resetting PersistentVolumeClaim %s/%s for dynamic provisioning because its PV %v has a reclaim policy of Delete", namespace, name, pvc.Spec.VolumeName)
ctx.log.Infof("Resetting PersistentVolumeClaim %s/%s for dynamic provisioning", namespace, name)
// use the unstructured helpers here since we're only deleting and
// the unstructured converter will add back (empty) fields for metadata