-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.14.0 Backup error when emptyDir pod volumes are attached #7929
Comments
What's the version of Velero you are using? |
@blackpiglet Velero v1.14.0 as mentioned in the title ;-) |
I apologize, I was wrong in regards to the volume policy (maybe I was misguided by the documentation here): The problem is actually in the So, IMHO this is a bug as an emptyDir will never have a PVC. The bug can be resolved by extending // cannot backup emptyDir volumes as they are not mounted into /var/lib/kubelet/pods
// and therefore not accessible to the node agent daemon set.
if vol.EmptyDir != nil {
includeVolumeInBackup = false
} |
Also seeing the same errors on 0.14.0 when using a resource policy. |
@blackpiglet I've tested your fix in the latest velero/velero:release-1.14-dev image and can confirm the issue has been resolved. Thank you! |
Hi @blackpiglet, any ETA for 1.14.1 release? |
The plan is to release it this August, but the detailed date is not set yet. |
What steps did you take and what happened:
Backing up a StatefulSet with an emptyDir attached reports an error during backup:
This is the (shortend) resource YAML:
What did you expect to happen:
The code to extend the volume policies seems to expect a PVC:
velero/pkg/util/kube/pvc_pv.go
Line 392 in c827fd0
Reporting a missing PVC for an emptyDir doesn't make sense. Instead emptyDirs should be skipped by the code.
The following information will help us better understand what's going on:
The new Volume Policy example provides a snippet for emptyDirs: https://velero.io/docs/main/resource-filtering/#yaml-template
So adding this to a Volume Policy resolves the issue:
Maybe it is intended to make this mandatory. But I can not imagine a situation where it makes sense to actually backup an emptyDir. And adding "ConfigMap" is non-sense, as ConfigMaps are resources which are backed up by Velero anyway (if not excluded explicitly).
If the core team decides that every user should add this condition to their VolumePolicies, I'm fine with closing this issue. But maybe this mandatory change should be mentioned in the release notes then. However, I would propose to not throw an error for emptyDir volumes as such scratch volumes are never be expected to be backed up.
The text was updated successfully, but these errors were encountered: