-
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
Persistent Volume with Reclaim Policy Delete gets recreated #2739
Comments
Maybe @skriss could have helped here, as he wrote the current logic in Lines 939 to 949 in f42c63a
But as far as I see he isn't maintainer anymore. Do you @nrb know about the current logic? |
@joschi36 Sorry about the delay in response. I don't think this use case is one we've encountered before, so I need to learn a little more about it. You're saying you have a PV manifest with no snapshot an a reclaim policy of Delete..is it actually deleted from Kubernetes at restore time? It appears so since Velero is recreating it. Is this volume also deleted from the Isilon storage system, or is the intention to re-associate with an existing volume in storage at restore time? |
Background: Case: What happens: Expectation: Clarifications: Solution: Thanks for your help @nrb |
Hey @nrb can you explain the behavior, because we would be happy to create a PR to extend the current switch with a flag in |
Sorry for the delay in response. I think I see the disconnect here - it's this line:
So in most cases where folks are using Velero, the storage is not completely decoupled from Kubernetes such that Velero should completely ignore the PV's reclaim policy. Velero does not re-apply the PV with a reclaim policy of The assumption comes from these docs:
I'll need to think more about PR #2869 - I don't know that completely removing it makes sense for all cases, but I see why it does in your case, or that a flag disabling it would be a good option for those systems where they don't follow expected behavior exactly as defined. |
@joschi36 I've closed out the PR, but I want to link the Kubernetes documentation to the The delete policy is intended to remove the volume from the underlying storage system entirely. If the currently storage system isn't doing that, then it should be using Velero is recreating volumes here because:
If you're using Velero only for the Kubernetes manifests and managing storage backup completely separately, then this is a use case we'll need to look into separately rather than completely removing the code, because Velero was intended to manage both in concert. I think the |
Closing this, please re-open if there are continuing issues |
What steps did you take and what happened:
We did a backup with Velero and without any form of volume backup (restic/volumesnapshot).
When restoring the PersistentVolume got recreated.
What did you expect to happen:
We expected that the manifest of the PersistentVolume gets applied as is with the same meta information.
The output of the following commands will help us better understand what's going on:
velero restore logs joschi-disaster-test
Anything else you would like to add:
We can't use the Reclaim Policy Retain as our storage integration (Dell EMC CSI Isilon) will not delete the volumes on the storage system.
My idea would be to define a flag which makes it configurable to choose whether to use the actual logic in
velero/pkg/restore/restore.go
Lines 862 to 950 in f42c63a
velero/pkg/restore/restore.go
Lines 939 to 949 in f42c63a
Environment:
velero version
): v1.4.0velero client config get features
): nonekubectl version
): v1.16.3-2+f1f3428e8468b6-dirty/etc/os-release
): CentOS Linux 7Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.
The text was updated successfully, but these errors were encountered: