-
Notifications
You must be signed in to change notification settings - Fork 83
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
feat: support volume cloning #914
feat: support volume cloning #914
Conversation
Hi @umagnus. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
pls also increase the timeout, I think 120s may be not enough now:
|
f9b4ed2
to
a2ea92b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls also add test in external e2e test, similar to smb driver volume cloning feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls also add your test result, e.g. which protocol works, which not (nfs does not work)
616d693
to
0a85034
Compare
to fix the sanity test failure, just download the azcopy binary, extract to current folder, it should work:
blob-csi-driver/test/sanity/run-test.sh Lines 34 to 36 in e8a3fdd
|
/retest |
1e9aa1e
to
67b624d
Compare
ea89cf8
to
ca8d303
Compare
/retest |
pkg/blob/controllerserver.go
Outdated
if copyErr != nil { | ||
if strings.Contains(string(out), azcopyAuthenticationFailedCode) { | ||
klog.Warningf("CopyContainer(%s, %s, %s) failed with error(%v): %v, sleep 2 min and retry", resourceGroupName, accountName, dstContainerName, err, string(out)) | ||
time.Sleep(2 * time.Minute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try tune this value a little bit and also it's better to have a wait for succeed process in the CreateVolume func, and we should enlarge timeout
as 10min:
- name: csi-provisioner
image: mcr.microsoft.com/oss/kubernetes-csi/csi-provisioner:v3.5.0
args:
- "-v=2"
...
- "--timeout=120s"
/retest |
/retest |
cbe699f
to
211df3a
Compare
211df3a
to
d9a12f3
Compare
17669f9
to
f53bf00
Compare
/retest |
b8935c4
to
fec2d23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from the logs, the percentage is not displayed in the logs, is that expected?
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:19.100220 1 controllerserver.go:728] generate sas token for account(fuse1974678f2544489c95c)
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:19.118210 1 controllerserver.go:740] azcopy job status: NotFound, copy percent: %, error: <nil>
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:19.118243 1 controllerserver.go:744] begin to copy blob container pvc-42316440-4e30-4c13-b4ad-928e02412159 to pvc-caac5a8c-50e0-4be1-ab40-31da7e4f724c
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:24.118132 1 controllerserver.go:749] azcopy job status: NotFound, copy percent: %, error: <nil>
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:24.118220 1 controllerserver.go:754] copy blob container pvc-42316440-4e30-4c13-b4ad-928e02412159 to pvc-caac5a8c-50e0-4be1-ab40-31da7e4f724c
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:32.313751 1 controllerserver.go:759] copied blob container pvc-42316440-4e30-4c13-b4ad-928e02412159 to pvc-caac5a8c-50e0-4be1-ab40-31da7e4f724c successfully
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:32.328586 1 controllerserver.go:441] store account key to k8s secret(azure-storage-account-fuse1974678f2544489c95c-secret) in blob-5670 namespace
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:32.328658 1 controllerserver.go:452] create container pvc-caac5a8c-50e0-4be1-ab40-31da7e4f724c on storage account fuse1974678f2544489c95c successfully
[pod/csi-blob-controller-567f79864d-zx5dl/blob] I1018 03:51:32.32
@@ -841,4 +841,132 @@ var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() { | |||
} | |||
test.Run(ctx, cs, ns) | |||
}) | |||
|
|||
ginkgo.It("should clone a volume from an existing NFSv3 volume [nfs]", func(ctx ginkgo.SpecContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does nfs volume also support volume cloning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, nfs is also supported
yes, this means azcopy is not in Running state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, umagnus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherrypick release-1.29 |
@andyzhangx: cannot checkout In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherrypick release-1.23 |
@andyzhangx: #914 failed to apply on top of branch "release-1.23":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Feat: support volume cloning in Azure Blob CSI driver (for backup)
Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
add mock for azcopy command ut. Create a interface
EXEC
andutil_mock.go
for it.Test in cluster by hand:
protocol blobfuse2
it seems that generate sas token for account need some time, in our test it needs about 2 minutes
protocol nfs
azcopy copy speed