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

Deregistering an instance from an ELB returns immediately with connection draining enabled #2723

Closed
danielhsu93 opened this issue Jul 21, 2017 · 6 comments
Assignees
Labels
feature-request A feature should be added or improved. waiter

Comments

@danielhsu93
Copy link

When I deregister an instance from an ELB with connection draining, I would expect that the aws cli deregister-instance-from-load-balancer call would return after all connections have been drained. However, this doesn't look like the case as the API call returns as soon as the request is received, regardless of whether or not the connection is still alive. Is there a workaround to ensure that the connection has been fully drained?

My use case is that I am terminating an instance as soon as the deregistration is successful/returns a response, but there's no guarantee that I don't have connections still.

@kyleknap
Copy link
Contributor

So, the CLI has the notion of waiters where you can wait for a specific state to get reached. For ELB, the CLI has a elb wait instance-in-service command that essentially keeps calling the describe-instance-health command until the instance's status is InService.

However, for your use case it seems that you need the opposite, a waiter for an out of service instance because according to the docs, once the the instance has been deregistered its status will be OutOfService.

Given there is no waiter for this in the CLI, the best you can do is do the pulling for the OutOfService status yourself with the describe-instance-health command. We will look into adding a waiter for this. In the meantime, marking as a feature request.

@kyleknap kyleknap added the feature-request A feature should be added or improved. label Jul 24, 2017
@carlnordenfelt
Copy link

I have the same problem, would be great for a wait command for this

@ASayre
Copy link
Contributor

ASayre commented Feb 6, 2018

Good Morning!

We're closing this issue here on GitHub, as part of our migration to UserVoice for feature requests involving the AWS CLI.

This will let us get the most important features to you, by making it easier to search for and show support for the features you care the most about, without diluting the conversation with bug reports.

As a quick UserVoice primer (if not already familiar): after an idea is posted, people can vote on the ideas, and the product team will be responding directly to the most popular suggestions.

We’ve imported existing feature requests from GitHub - Search for this issue there!

And don't worry, this issue will still exist on GitHub for posterity's sake. As it’s a text-only import of the original post into UserVoice, we’ll still be keeping in mind the comments and discussion that already exist here on the GitHub issue.

GitHub will remain the channel for reporting bugs.

Once again, this issue can now be found by searching for the title on: https://aws.uservoice.com/forums/598381-aws-command-line-interface

-The AWS SDKs & Tools Team

@ASayre ASayre closed this as completed Feb 6, 2018
@jamesls jamesls reopened this Apr 6, 2018
@jamesls
Copy link
Member

jamesls commented Apr 6, 2018

Based on community feedback, we have decided to return feature requests to GitHub issues.

@tim-finnigan tim-finnigan self-assigned this Nov 9, 2021
@tim-finnigan
Copy link
Contributor

It looks like this issue can now be closed as the instance-deregistered wait command is available: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/elb/wait/instance-deregistered.html

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. waiter
Projects
None yet
Development

No branches or pull requests

6 participants