Skip to content

Commit d884d99

Browse files
authored
Merge pull request #1426 from kubernetes-sigs/revert-1309-fix-RandomMatchingAccount
Revert "fix: don't use account search cache in RandomMatchingAccount mode"
2 parents 92dd58f + 64680aa commit d884d99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/driver-parameters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ requireInfraEncryption | specify whether or not the service applies a secondary
4040
storageEndpointSuffix | specify Azure storage endpoint suffix | `core.windows.net`, `core.chinacloudapi.cn`, etc | No | if empty, driver will use default storage endpoint suffix according to cloud environment, e.g. `core.windows.net`
4141
tags | [tags](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources) would be created in newly created storage account | tag format: 'foo=aaa,bar=bbb' | No | ""
4242
matchTags | whether matching tags when driver tries to find a suitable storage account | `true`,`false` | No | `false`
43-
selectRandomMatchingAccount | whether randomly selecting a matching account, by default, the driver would always select the first matching account in alphabetical order | `true`,`false` | No | `false`
43+
selectRandomMatchingAccount | whether randomly selecting a matching account, by default, the driver would always select the first matching account in alphabetical order(note: this driver uses account search cache, which results in uneven distribution of file creation across multiple accounts) | `true`,`false` | No | `false`
4444
accountQuota | to limit the quota for an account, you can specify a maximum quota in GB (`102400`GB by default). If the account exceeds the specified quota, the driver would skip selecting the account | `` | No | `102400`
4545
--- | **Following parameters are only for SMB protocol** | --- | --- |
4646
subscriptionID | specify Azure subscription ID where Azure file share will be created | Azure subscription ID | No | if not empty, `resourceGroup` must be provided

pkg/azurefile/controllerserver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
442442
if err != nil {
443443
return nil, status.Errorf(codes.Internal, err.Error())
444444
}
445-
if cache != nil && !selectRandomMatchingAccount {
445+
if cache != nil {
446446
accountName = cache.(string)
447447
} else {
448448
d.volLockMap.LockEntry(lockKey)

0 commit comments

Comments
 (0)