-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Reduce API calls for Azure instance metadata #67478
Conversation
/sig azure |
/kind bug |
Do we have any rate limit doc about instance metadata feature @khenidak , it's a little weird for this fix: Related calls are under here:
|
@feiskyer why is this causing kube-scheduler to not even start? |
I honestly think we should cache this call. Zone, ip, vm name etc will not change that frequently. I do second @andyzhangx comments wrt not understanding the difference between Text and Object - the number of calls is the same either way, right? |
@khenidak This PR reduces the original two calls to one: @ritazh Kubelet won't initialize itself successfully, hence some operations are not working as expected. |
will test this first thing tomorrow morning |
@ritazh that's great, then we will wait for your comment. |
@andyzhangx We may introduce caches for them in the future (which needs more work because we should cache all metadata requests), but now changing to json API does work to fix current issues. @ritazh Thanks. |
confirming this fixes Azure/acs-engine#3681 |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, feiskyer 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 |
/test all Tests are more than 96 hours old. Re-running tests. |
/test all [submit-queue is verifying that this PR is safe to merge] |
/retest |
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:
Azure cloud provider gets a lot of
"Too many requests"
error when getting availability zones, instance types and node addresses. Hence kubelet won't be able to initialize itself sometimes.This PR reduces such calls and alos switches to json API which is more stable.
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 Azure/acs-engine#3681
Special notes for your reviewer:
Release note:
cc @ritazh @khenidak @andyzhangx