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

Set EC2 instance cache max age to 10 mins #259

Merged
merged 1 commit into from Aug 26, 2021

Conversation

nckturner
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

The AWS in-tree controller caches the EC2 instance information indefinitely unless the nodes get scaled up. In case the EC2 instances have multiple security groups attached, this caching strategy leads to inconsistency between the actual EC2 instance configuration in AWS and the controller's view of the EC2 instance information. This PR sets the maximum age of 10 minutes to the EC2 instance cache.

Once the security group requirements are satisfied, controller will be able to fetch the new EC2 information, and get past the following errors without scaling up the nodes -

  • Multiple tagged security groups found for instance i-xxxx ...
  • Multiple untagged security groups found for instance i-xxx ...

Which issue(s) this PR fixes:
Fixes #255

Special notes for your reviewer:

Testing

  • First setup an EC2 instance with at least 2 security groups, none of them contain the cluster tag. As expected, the in-tree controller fails to provision the load balancer. Attach a cluster tagged security group to the EC2 instances, and verify after the cache expiry controller is able to fetch the updated information without having to scale up the k8s worker nodes.
  • Update the EC2 instance security groups configuration, and verify the the controller is able to update the correct security group after the cache expiry.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesn't merit a release note. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 26, 2021
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 26, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 26, 2021
Copy link
Contributor

@M00nF1sh M00nF1sh left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 26, 2021
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 26, 2021
@M00nF1sh
Copy link
Contributor

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kishorj, M00nF1sh, nckturner

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 k8s-ci-robot merged commit 68a20f5 into kubernetes:master Aug 26, 2021
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cherry pick #102927
4 participants