-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
fix azure storage account creation failure #65846
fix azure storage account creation failure #65846
Conversation
The document listed in code is for update. For creation, all 3 kinds are supported: So according to the docs, If we're to make it StorageV2 in future, that'd be a decision we make, not limited by api. Can consider updating the comment in code. |
@karataliu original storage account is identical to The three different storage account options are:
You can upgrade your GPv1 or Blob storage account to a GPv2 account using Azure portal, PowerShell, or Azure CLI. |
/test pull-kubernetes-e2e-kops-aws |
BTW, this is a critical bug, storage account creation is broken on v1.11 and master branch |
@@ -113,6 +113,8 @@ func (az *Cloud) ensureStorageAccount(accountName, accountType, location, genAcc | |||
accountName, az.ResourceGroup, location, accountType) | |||
cp := storage.AccountCreateParameters{ | |||
Sku: &storage.Sku{Name: storage.SkuName(accountType)}, | |||
// set as StorageV2 according to https://docs.microsoft.com/en-us/rest/api/storagerp/StorageAccounts/Update |
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.
nit: Also add a comment: "Currently only StorageV2 supported" for updates?
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.
hmm, this is only for create, so all 3 kinds are supported here. So it's better changing the link to https://docs.microsoft.com/en-us/azure/storage/common/storage-account-options and add a comment of why StorageV2 is chosen
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.
This is exactly what i meant.
The comment should be 'StorageV2' is chosen by purpose, not limited by api.
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.
fixed by new comment
/priority critical-urgent |
Will it make sense to add an e2e case for dynamic provisioning of AzureFile backed volumes to catch such issues (resulting from upgrading azure SDK or due to some other reason) in the future? |
fix comments
8e41b09
to
b76a3a1
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.
@feiskyer @karataliu PTAL
@@ -113,6 +113,8 @@ func (az *Cloud) ensureStorageAccount(accountName, accountType, location, genAcc | |||
accountName, az.ResourceGroup, location, accountType) | |||
cp := storage.AccountCreateParameters{ | |||
Sku: &storage.Sku{Name: storage.SkuName(accountType)}, | |||
// set as StorageV2 according to https://docs.microsoft.com/en-us/rest/api/storagerp/StorageAccounts/Update |
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.
fixed by new comment
@ddebroy good question, I found this issue on Azure acs-engine regression test, while in upstream, there is no such plan to add Azure e2e test since cloud provider will be split to standalone repo in the near future. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, karataliu 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 |
Azure related e2e tests are adding to https://github.com/kubernetes/cloud-provider-azure. @karataliu is working on that part. |
/test all [submit-queue is verifying that this PR is safe to merge] |
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
fix azure storage account creation failure
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #65845
Special notes for your reviewer:
This bug is due to azure-sdk-for-go API change introduced in v1.11:
https://github.com/Azure/azure-sdk-for-go/blob/fbe7db0e3f9793ba3e5704efbab84f51436c136e/services/storage/mgmt/2017-10-01/storage/models.go#L381-L382
there is a new field
Kind
which is required, so any sdk upgrade from and old version would break the storage account creation since old code won't useKind
. I have filed an issue to azure-sdk-for-go: Azure/azure-sdk-for-go#2182Release note:
/kind bug
/sig azure
/assign @khenidak @feiskyer
cc @brendandburns