cloud-provider-aws icon indicating copy to clipboard operation
cloud-provider-aws copied to clipboard

Single goroutine access to the node cache

Open kon-angelo opened this issue 1 year ago • 9 comments

What type of PR is this? /kind bug

What this PR does / why we need it: This PR restricts the access to the describeAllInstancesUncached to a single worker. For AWS accounts with thousand of EC2 instances the call to fetch the instances from the AWS API is costly in resources. On startup of the CCM with concurrent-service-syncs > 1 because the cache is empty all the workers will try to hit the AWS API which creates very large spikes in resources used.

With this PR only one worker will access describeAllInstancesUncached while the rest will wait for the mutex.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fix a bug that leads to multiple workers making concurrent `DescribeInstance` requests to AWS.

kon-angelo avatar Sep 26 '22 09:09 kon-angelo

@kon-angelo: This issue is currently awaiting triage.

If cloud-provider-aws contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

k8s-ci-robot avatar Sep 26 '22 09:09 k8s-ci-robot

Welcome @kon-angelo!

It looks like this is your first PR to kubernetes/cloud-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/cloud-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Sep 26 '22 09:09 k8s-ci-robot

Hi @kon-angelo. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

k8s-ci-robot avatar Sep 26 '22 09:09 k8s-ci-robot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jaypipes

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 06 '22 17:10 k8s-ci-robot

New changes are detected. LGTM label has been removed.

k8s-ci-robot avatar Oct 11 '22 08:10 k8s-ci-robot

/retest

kon-angelo avatar Oct 11 '22 08:10 kon-angelo

@kon-angelo: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

k8s-ci-robot avatar Oct 11 '22 08:10 k8s-ci-robot

/ok-to-test

nckturner avatar Oct 14 '22 16:10 nckturner

/assign

nckturner avatar Oct 14 '22 16:10 nckturner

@nckturner do you want to do more here since you assigned it to yourself?

olemarkus avatar Dec 09 '22 13:12 olemarkus

/approve /lgtm

looks like comments have been addressed and Jay seems happy with it. It looks good to me as well.

dims avatar Jan 17 '23 18:01 dims

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, jaypipes

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Jan 17 '23 18:01 k8s-ci-robot