-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for block volumes #1
Conversation
I fixed the resolveSymlink() issue. Now Kopia Upload() is failing as it does not support the block devices. |
I added some minimal Kopia code for block device support and backup completed. |
I added the --privileged-agent option to velero installer. |
nice progress, thanks @dzaninovic |
I made changes to the restore and restore is now trying to use Kopia and failing as expected: time="2023-08-03T21:03:12Z" level=warning msg="Failed to patch data download with err Failed to run kopia restore: Failed to copy snapshot data to the target: restore error: error copying: copy file: error creating file: truncate /host_pods/081a1b95-461c-465b-a2b6-bd340f27b347/volumeDevices/kubernetes.io~csi/pvc-d3237e9d-e7a2-45be-8fb2-8ab59c1f0f0c: invalid argument" controller=DataDownload datadownload=restore1-w6w8f error="Failed to run kopia restore: Failed to copy snapshot data to the target: restore error: error copying: copy file: error creating file: truncate /host_pods/081a1b95-461c-465b-a2b6-bd340f27b347/volumeDevices/kubernetes.io~csi/pvc-d3237e9d-e7a2-45be-8fb2-8ab59c1f0f0c: invalid argument" error.file="/go/pkg/mod/github.com/kopia/kopia@v0.13.0/snapshot/restore/local_fs_output.go:153" error.function="github.com/kopia/kopia/snapshot/restore.(*FilesystemOutput.WriteFile" logSource="pkg/controller/data_download_controller.go:323" I will work on implementing Kopia code to support block device restore. |
I refactored the code to adjust for changes in vmware-tanzu#6608. |
I ran a restore test with 10 MB of random data and data was restored with correct md5 hash. |
nice! |
f09982c
to
2a64563
Compare
I rebased the branch with upstream, restore still works fine. |
af67b8f
to
bd709ce
Compare
I merged @shawn-hurley's code and rebased with upstream as there were conflicts. |
b5d181f
to
efc9583
Compare
I reverted #2 since it was causing backup failure. |
efc9583
to
4870510
Compare
I fixed all automated tests. |
I merged @shawn-hurley's code and tested it. Restored data md5 is correct. |
7a9003f
to
0591fbf
Compare
I rebased the branch with upstream and fixed a conflict. |
I am working on resolving conflicts caused by merging of vmware-tanzu#6608 |
0591fbf
to
b791be9
Compare
I rebased with upstream and made required changes to make it work with vmware-tanzu#6608 changes. Waiting for design PR vmware-tanzu#6590 to be merged before submitting this PR to upstream. |
23ba099
to
c8cdc8c
Compare
c8cdc8c
to
8eecb97
Compare
I am ready to create the upstream PR so I will do that after @shawn-hurley is done with his review here. |
Signed-off-by: David Zaninovic <dzaninovic@catalogicsoftware.com>
8eecb97
to
4bd0ec2
Compare
I created the upstream PR vmware-tanzu#6680 so I will close this. |
Code marked with "REVIEW:" is either temporary or something needs to be done.
Backup and restore works.
Issue for this code: vmware-tanzu#6548
Design: vmware-tanzu#6590
Interface change: vmware-tanzu#6608
If using Minikube with hostpath CSI driver run this script to fix an issue with creating PVCs from block device snapshot otherwise restore will hang: fix_minikube_loop.tar.gz
Loop devices are not created automatically in the minikube environment so the script will create them ahead of time to workaround the issue.