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

autoscaling waiters #318

Closed
aleksandersumowski opened this issue Oct 23, 2015 · 18 comments
Closed

autoscaling waiters #318

aleksandersumowski opened this issue Oct 23, 2015 · 18 comments
Assignees
Labels
feature-request This issue requests a feature. needs-review p2 This is a standard priority issue waiters

Comments

@aleksandersumowski
Copy link

I'd like to script a blue-green deployment between two auto scaling groups.

Having a waiter that would tell me when instances in the new group have finished launching would help a lot.

@mtdowling mtdowling added the feature-request This issue requests a feature. label Oct 23, 2015
@mtdowling
Copy link
Contributor

Thanks, I'll mark this as a feature request. In the meantime, I think you'd need to describe the autoscaling group and poll the instances in the group until they are marked as InService.

@kyleknap
Copy link
Contributor

kyleknap commented Dec 9, 2015

+1 on feature request from user who contacted me

@quiver
Copy link
Contributor

quiver commented Mar 1, 2016

+1 (I need this feature in my project)

aws/aws-sdk-ruby has already implemented this but has some bugs aws/aws-sdk-ruby#1109 .
Once it's fixed, just copy the waiter JSON to botocore and it should work fine 😃

@kyleknap
Copy link
Contributor

kyleknap commented Mar 1, 2016

@quiver I will pull the waiters from the ruby sdk once they get fixed.

@quiver
Copy link
Contributor

quiver commented Mar 1, 2016

@kyleknap thx.

@revmischa
Copy link

+1 definitely need this for https://github.com/revmischa/udo

@fzk-rec
Copy link

fzk-rec commented Nov 29, 2016

Any update on this?

@gyoza
Copy link

gyoza commented Nov 29, 2016

This would be great for a project we're doing at the company I work at also. Right now I just have a 30 minute celery job that checks to see if anything has been done ...

@fzk-rec
Copy link

fzk-rec commented Nov 30, 2016

My workaround is to check every 30 seconds if the ASG still exists:
response = client.describe_auto_scaling_groups(...)
while response['AutoScalingGroups']:
time.sleep(30)

@gyoza
Copy link

gyoza commented Nov 30, 2016

That type of a solution wouldn't be ideal when your AWS account is getting close to its API limits. Loops and whiles on response codes is a solution but its a bit dirty and could be nicer.

@dmulter
Copy link

dmulter commented Jan 26, 2017

Today I'm polling, but would much prefer waiters for the following:

  • ASG deleted
  • At least one EC2 instance has started in a new ASG

@ismaelfernandezscmspain
Copy link

+1 (I need this feature )

@gyoza
Copy link

gyoza commented Jun 12, 2017

Just a thought for everybody 'polling' -- could always just monitor SQS for messages from the ASGs in the meanwhile.

@yks0000
Copy link

yks0000 commented Oct 27, 2017

I was looking for waiters for Attach and Detach ELB in ASG. Searched the boto3 docs but did not see any waiter name there.

Does any one implemented it or any suggestion in this regards.

http://boto3.readthedocs.io/en/latest/reference/services/autoscaling.html#AutoScaling.Client.get_waiter

@Gaafar1
Copy link

Gaafar1 commented Apr 8, 2019

is there any waiters for reinstatement for New instances in ASG to come on air if old instance is unhealthy or terminated ?

@ismferd
Copy link

ismferd commented Apr 8, 2019

Have you tried with cfn-helpers? cfn-signal could help you.
https://docs.aws.amazon.com/es_es/AWSCloudFormation/latest/UserGuide/cfn-helper-scripts-reference.html

@cognitiaclaeves
Copy link

I wandered into this forum while looking for a waiter for ASG. As of this date, there still isn't one, but I noticed something in this thread that I found misleading. There is an implication that waiters are solutions that do not poll, and therefore are preferable to writing your own poller. I don't believe this is the case. Here is what the documentation says about a waiter (for ec2):

wait(**kwargs)

Polls EC2.Client.describe_instances() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

( source: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Waiter.InstanceStopped )

So I think that rolling your own poller should be fine. ... For anyone that is waiting on a waiter for a particular service, I also found out that you could implement your own:

https://www.2ndwatch.com/blog/use-waiters-boto3-write/

Also, the way the existing waiters are implemented can be found in botocore and used for examples of how to write your own:

https://github.com/boto/botocore/blob/master/botocore/data/ec2/2016-11-15/waiters-2.json

@aBurmeseDev aBurmeseDev added needs-review p2 This is a standard priority issue labels Nov 10, 2022
@tim-finnigan tim-finnigan self-assigned this Nov 22, 2022
@tim-finnigan
Copy link
Contributor

Thanks all for your patience. Because service teams now own the creation of their waiter models for use across SDKs, I created a new tracking issue for this in our cross-SDK repository: aws/aws-sdk#419. And I reached out to the AutoScaling team to see if they would consider adding the waiter models requested in this issue.

If any one has any additional feedback on this request please let us know and you can refer to that new issue for updates going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue requests a feature. needs-review p2 This is a standard priority issue waiters
Projects
None yet
Development

No branches or pull requests