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

Support multiple scale sets in Azure cloud provider #57543

Merged
merged 1 commit into from
Dec 25, 2017

Conversation

feiskyer
Copy link
Member

@feiskyer feiskyer commented Dec 22, 2017

What this PR does / why we need it:

This PR adds multiple scale sets support in Azure cloud provider.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Continue of #43287.

Special notes for your reviewer:

  • Adds a local cache of basic scale sets information
  • Update the cache when new nodes are not found or periodically
  • Since azure doesn't support getting the scale set which contains the node, the cache is updated via listing all scale sets and their virtual machines

Release note:

Support multiple scale sets in Azure cloud provider.

/assign @brendandburns @andyzhangx

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 22, 2017
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 22, 2017
@andyzhangx
Copy link
Member

@karataliu for review

if err := ss.updateCache(); err != nil {
glog.Errorf("updateCache failed: %v", err)
}
}, 5*time.Minute, wait.NeverStop)
Copy link
Member

Choose a reason for hiding this comment

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

is there any reference for this value?

Copy link
Member Author

Choose a reason for hiding this comment

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

No.

return "", cloudprovider.InstanceNotFound
scaleSetName, err := extractScaleSetNameByVMID(providerID)
if err != nil {
glog.V(4).Infof("Can not extract scale set name from providerID (%s), assuming it is mananaged by availability set", providerID)
Copy link
Member

Choose a reason for hiding this comment

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

Infof ? Pls print err, and it does not return err?

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.


instanceID, err := getLastSegment(providerID)
if err != nil {
glog.V(4).Infof("Can not extract instanceID from providerID (%s), assuming it is mananaged by availability set", providerID)
Copy link
Member

Choose a reason for hiding this comment

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

same as above about err

@andyzhangx
Copy link
Member

BTW, will there be a similar implementaion of updatecache for availability set?

@feiskyer
Copy link
Member Author

BTW, will there be a similar implementaion of updatecache for availability set?

availability set cache will be supported with difference ways. @karataliu is working on it.

@feiskyer
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 25, 2017
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, feiskyer

Associated issue: #43287

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
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

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

@k8s-github-robot k8s-github-robot merged commit b047e8e into kubernetes:master Dec 25, 2017
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Dec 25, 2017

@feiskyer: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-unit c07ab68 link /test pull-kubernetes-unit

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@feiskyer feiskyer deleted the vmss-cache branch December 25, 2017 04:26
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants