@@ -914,7 +914,7 @@ func (d *Driver) CopyFileShare(ctx context.Context, req *csi.CreateVolumeRequest
914
914
accountSasToken , err := getAccountSasToken (secrets , accountName )
915
915
if err != nil || accountSasToken == "" {
916
916
klog .V (2 ).Infof ("get account sas token from secrets err: %s, generate sas token for account(%s)" , err .Error (), accountName )
917
- accountSasToken , err = GenerateSASToken (accountName , accountKey , storageEndpointSuffix )
917
+ accountSasToken , err = generateSASToken (accountName , accountKey , storageEndpointSuffix )
918
918
if err != nil {
919
919
return true , err
920
920
}
@@ -929,6 +929,7 @@ func (d *Driver) CopyFileShare(ctx context.Context, req *csi.CreateVolumeRequest
929
929
srcPath := fmt .Sprintf ("https://%s.file.%s/%s%s" , accountName , storageEndpointSuffix , srcFileShareName , accountSasToken )
930
930
dstPath := fmt .Sprintf ("https://%s.file.%s/%s%s" , accountName , storageEndpointSuffix , dstFileShareName , accountSasToken )
931
931
932
+ time .Sleep (1 * time .Second )
932
933
klog .V (2 ).Infof ("copy fileshare %s to %s" , srcFileShareName , dstFileShareName )
933
934
out , copyErr = exec .Command ("azcopy" , "copy" , srcPath , dstPath , "--recursive" , "--check-length=false" ).CombinedOutput ()
934
935
if copyErr != nil {
@@ -942,7 +943,7 @@ func (d *Driver) CopyFileShare(ctx context.Context, req *csi.CreateVolumeRequest
942
943
klog .V (2 ).Infof ("copied fileshare %s to %s successfully" , srcFileShareName , dstFileShareName )
943
944
} else {
944
945
klog .V (2 ).Infof ("generate sas token for account(%s)" , accountName )
945
- accountSasToken , genErr := GenerateSASToken (accountName , accountKey , storageEndpointSuffix )
946
+ accountSasToken , genErr := generateSASToken (accountName , accountKey , storageEndpointSuffix )
946
947
if genErr != nil {
947
948
return true , genErr
948
949
}
@@ -952,6 +953,7 @@ func (d *Driver) CopyFileShare(ctx context.Context, req *csi.CreateVolumeRequest
952
953
srcPath := fmt .Sprintf ("https://%s.file.%s/%s%s" , accountName , storageEndpointSuffix , srcFileShareName , accountSasToken )
953
954
dstPath := fmt .Sprintf ("https://%s.file.%s/%s%s" , accountName , storageEndpointSuffix , dstFileShareName , accountSasToken )
954
955
956
+ time .Sleep (1 * time .Second )
955
957
klog .V (2 ).Infof ("copy fileshare %s to %s" , srcFileShareName , dstFileShareName )
956
958
out , copyErr = exec .Command ("azcopy" , "copy" , srcPath , dstPath , "--recursive" , "--check-length=false" ).CombinedOutput ()
957
959
if copyErr != nil {
0 commit comments