bug fix: save PVBs even if no snapshot was taken

Signed-off-by: Steve Kriss <krisss@vmware.com>
pull/2390/head
Steve Kriss 2020-04-02 12:57:38 -06:00
parent 969526cee5
commit 91228522be
2 changed files with 1 additions and 4 deletions

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))

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