Skip to content
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 disk storage account init issue #55927

Merged
merged 2 commits into from
Nov 18, 2017

Conversation

andyzhangx
Copy link
Member

What this PR does / why we need it:
There are two issues for the original azure disk storage account initialaztion code:

  1. wrong controller-master detection, see issue wrong controller-master detection #54570, Azure disk dose not work as expected #55776
  2. should not initialize two storage account even if it's not necessary, see issue Azure data disk should provision storage account on on-demand #50883

This PR would fix the above two issues:
For 1: remove the controller-master process binding
For 2: remove the storage account initialization process, just create on demand

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 #54570
Fixes #55776
Fixes #50883

Special notes for your reviewer:
@rootfs @karataliu

Release note:

fix azure disk storage account init issue

/sig azure

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/azure size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 17, 2017
@@ -330,41 +325,6 @@ func (c *BlobDiskController) init() error {
}
c.accounts = accounts

if len(c.accounts) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also update comment lines before init method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -543,13 +503,7 @@ func (c *BlobDiskController) getDiskCount(SAName string) (int, error) {
// and we only do that in the controller

func (c *BlobDiskController) shouldInit() bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

init() func removed

remove init func

allow getStorageAccounts failed
@rootfs
Copy link
Contributor

rootfs commented Nov 17, 2017

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 17, 2017
@andyzhangx
Copy link
Member Author

/assign @jdumars

@jdumars
Copy link
Member

jdumars commented Nov 17, 2017

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, jdumars, rootfs

Associated issue: 54570

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 55233, 55927, 55903, 54867, 55940). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit e8df004 into kubernetes:master Nov 18, 2017
k8s-github-robot pushed a commit that referenced this pull request Dec 17, 2017
…5927-upstream-release-1.8

Automatic merge from submit-queue.

Automated cherry pick of #55927

Cherry pick of #55927 on release-1.8.

#55927: move InitStorageAccount into azure disk provision func
k8s-github-robot pushed a commit that referenced this pull request Dec 28, 2017
…5927-upstream-release-1.7

Automatic merge from submit-queue.

Automated cherry pick of #55927

Cherry pick of #55927 on release-1.7.

#55927: move InitStorageAccount into azure disk provision func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
8 participants