diff --git a/pkg/controller/pod_volume_restore_controller.go b/pkg/controller/pod_volume_restore_controller.go index 2e1d6ff09..1c72e7444 100644 --- a/pkg/controller/pod_volume_restore_controller.go +++ b/pkg/controller/pod_volume_restore_controller.go @@ -339,10 +339,11 @@ func restorePodVolume(req *arkv1api.PodVolumeRestore, credsFile, volumeDir strin return errors.Wrapf(err, "error moving files from restore staging directory into volume") } - // The staging directory should be empty at this point since we moved everything, but - // make sure. + // Remove staging directory (which should be empty at this point) from daemonset pod. + // Don't fail the restore if this returns an error, since the actual directory content + // has already successfully been moved into the pod volume. if err := os.RemoveAll(restorePath); err != nil { - return errors.Wrap(err, "error removing restore staging directory and its contents") + log.WithError(err).Warnf("error removing staging directory %s for pod volume restore %s/%s", restorePath, req.Namespace, req.Name) } var restoreUID types.UID