-
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
Backup hooks fsfreeze example does nothing useful #4268
Comments
One universal solution to pvc problem would be, check all pods that will be backed up for pre-post hooks and if those pods also mount pvcs, to backup pvcs between the pre- and post- hooks. This may assume a pvc belongs to at most one pod. |
I don't quite understand why It seems you are trying to point out a limitation of the current backup hook mechanism. |
@reasonerjt In one of my backup hooks experiments, instead of fsfreeze, I replace it with Both pre-hook and post-hook created a file after backup is completed, but pre-hook created file is not persisted in the restore. In another case, I created a file in the same location (example's mounted pvc) prior to creating backup. Now this file does exist in the restore, but again the prehook and posthook files are not existing in restore. This confirms the theory that
PS: I chatted with @sseago and he agrees this is the case currently and making annotated pod's mounted pvc backup between the annotated pod's pre and post backup hooks (and making fsfreeze example useful) will require major refactoring. |
fsfreeze example is only useful when
|
Sample workload
Add something to PVC prior to backup
Adding pod annotation
Expected path in restore
Actual path in restore
|
Signed-off-by: Daniel Jiang <[email protected]>
@kaovilai In my test I could see the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing the stale issue. |
What steps did you take and what happened:
[A clear and concise description of what the bug is, and what commands you ran.)
Working on a related lab project and noticing that creating a file with pre-hook annotation to a pod's mounted pvc, may not exist on restore if pvc is backed up prior to pre-hookCommand execution.
The fsfreeze example would only do something useful if pvc is guaranteed to backup in between pre and post backup hook of the pod.
What did you expect to happen:
Ability to have pod pre-hook command execute, then mounted pvc gets backed up, only then does the post-hook command execute.
The output of the following commands will help us better understand what's going on:
(Pasting long output into a GitHub gist or other pastebin is fine.)
https://gist.github.com/kaovilai/8e9b814e2a85bb91e05921f3e9ed9aff#file-backup-log-L628-L665
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
This issue maybe partially closed with #4067
At the pod annotation level, there is currently no way to have mounted pvc be backed up in between a pod's pre and post hook.
Environment:
velero version
): v1.7.0velero client config get features
): not setkubectl version
): v1.21.1+f36aa36/etc/os-release
): Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64Vote 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: