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

wait for instances to drain from classic LB #12902

Merged
merged 7 commits into from
Dec 14, 2021

Conversation

heybronson
Copy link
Contributor

@heybronson heybronson commented Dec 6, 2021

Now that we've enabled connection draining by default for all classic LBs (#12881), we need to ensure that we're waiting for connectionDraining to complete before terminating the instance.

Deleting the instance without waiting doesn't allow for connections to drain. We need to call DeregisterInstancesFromLoadBalancer which will ensure that there aren't any ongoing connections to the instance before we terminate.

Gathering the corresponding loadBalancers by describing the underlying ASG.

Confirmed that rolling-updates continue to behave as expected and 0% of requests are dropped from corresponding load balancers.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 6, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @heybronson. 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 k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 6, 2021
@k8s-ci-robot k8s-ci-robot added the area/provider/aws Issues or PRs related to aws provider label Dec 6, 2021
@johngmyers
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 7, 2021
Copy link
Member

@rifelpet rifelpet left a comment

Choose a reason for hiding this comment

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

Ideally we could cache the DescribeAutoScalingGroups response since it isn't likely to change between deleteInstance calls on instances from the same InstanceGroup, but the frequency that the Describe call is being made (once every few minutes) shouldn't have a material impact on AWS API call volume.

upup/pkg/fi/cloudup/awsup/aws_cloud.go Show resolved Hide resolved
Copy link
Member

@johngmyers johngmyers left a comment

Choose a reason for hiding this comment

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

So this is only load balancers that are associated with the ASG, so probably only the ones directly created by kOps. Not the ones created by KCM/LBC. Unfortunate there doesn't seem to be a call to enumerate the load balancers that an instance is registered with.

And this only helps with rolling update, not cluster-autoscaler scale-down. I'm still hoping for someone to implement graceful node shutdown.

upup/pkg/fi/cloudup/awsup/aws_cloud.go Show resolved Hide resolved
upup/pkg/fi/cloudup/awsup/aws_cloud.go Outdated Show resolved Hide resolved
@heybronson
Copy link
Contributor Author

/assign @johngmyers

@heybronson
Copy link
Contributor Author

friendly bump

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 11, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 13, 2021
@heybronson
Copy link
Contributor Author

/assign @olemarkus

@olemarkus
Copy link
Member

/lgtm

Will approve unless someone objects in the next day or so.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 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 Dec 14, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johngmyers, olemarkus

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:
  • OWNERS [johngmyers,olemarkus]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@heybronson
Copy link
Contributor Author

/test pull-kops-verify-golangci-lint

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/provider/aws Issues or PRs related to aws provider 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

5 participants