@@ -914,7 +914,7 @@ func (d *Driver) CopyFileShare(ctx context.Context, req *csi.CreateVolumeRequest
914914			accountSasToken , err  :=  getAccountSasToken (secrets , accountName )
915915			if  err  !=  nil  ||  accountSasToken  ==  ""  {
916916				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 )
918918				if  err  !=  nil  {
919919					return  true , err 
920920				}
@@ -929,6 +929,7 @@ func (d *Driver) CopyFileShare(ctx context.Context, req *csi.CreateVolumeRequest
929929			srcPath  :=  fmt .Sprintf ("https://%s.file.%s/%s%s" , accountName , storageEndpointSuffix , srcFileShareName , accountSasToken )
930930			dstPath  :=  fmt .Sprintf ("https://%s.file.%s/%s%s" , accountName , storageEndpointSuffix , dstFileShareName , accountSasToken )
931931
932+ 			time .Sleep (1  *  time .Second )
932933			klog .V (2 ).Infof ("copy fileshare %s to %s" , srcFileShareName , dstFileShareName )
933934			out , copyErr  =  exec .Command ("azcopy" , "copy" , srcPath , dstPath , "--recursive" , "--check-length=false" ).CombinedOutput ()
934935			if  copyErr  !=  nil  {
@@ -942,7 +943,7 @@ func (d *Driver) CopyFileShare(ctx context.Context, req *csi.CreateVolumeRequest
942943			klog .V (2 ).Infof ("copied fileshare %s to %s successfully" , srcFileShareName , dstFileShareName )
943944		} else  {
944945			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 )
946947			if  genErr  !=  nil  {
947948				return  true , genErr 
948949			}
@@ -952,6 +953,7 @@ func (d *Driver) CopyFileShare(ctx context.Context, req *csi.CreateVolumeRequest
952953			srcPath  :=  fmt .Sprintf ("https://%s.file.%s/%s%s" , accountName , storageEndpointSuffix , srcFileShareName , accountSasToken )
953954			dstPath  :=  fmt .Sprintf ("https://%s.file.%s/%s%s" , accountName , storageEndpointSuffix , dstFileShareName , accountSasToken )
954955
956+ 			time .Sleep (1  *  time .Second )
955957			klog .V (2 ).Infof ("copy fileshare %s to %s" , srcFileShareName , dstFileShareName )
956958			out , copyErr  =  exec .Command ("azcopy" , "copy" , srcPath , dstPath , "--recursive" , "--check-length=false" ).CombinedOutput ()
957959			if  copyErr  !=  nil  {
0 commit comments