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 #102927

Merged
merged 1 commit into from
Aug 5, 2021
Merged

Set EC2 instance cache max age to 10 mins #102927

merged 1 commit into from
Aug 5, 2021

Conversation

kishorj
Copy link
Contributor

@kishorj kishorj commented Jun 16, 2021

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 #

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

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 16, 2021
@k8s-ci-robot
Copy link
Contributor

@kishorj: This issue is currently awaiting triage.

If a SIG or subproject determines 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 k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/cloudprovider sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 16, 2021
@M00nF1sh
Copy link
Contributor

/lgtm
/approve

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

kishorj commented Jun 16, 2021

/retest

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 12, 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 Jul 12, 2021
Copy link
Member

@andrewsykim andrewsykim left a comment

Choose a reason for hiding this comment

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

/approve

(confirming this is a bug fix)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 12, 2021
@kishorj
Copy link
Contributor Author

kishorj commented Jul 12, 2021

/retest

@k8s-ci-robot k8s-ci-robot merged commit fad57be into kubernetes:master Aug 5, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Aug 5, 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. area/cloudprovider 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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. 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.

None yet

4 participants