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

Retry if instance is not in 'running' state #23

Open
mikery opened this issue Jul 18, 2013 · 0 comments
Open

Retry if instance is not in 'running' state #23

mikery opened this issue Jul 18, 2013 · 0 comments
Assignees
Labels

Comments

@mikery
Copy link
Collaborator

mikery commented Jul 18, 2013

It appears there is sometimes a delay which causes the EC2 API to believe the instance is not yet in the 'running' state. The breaks snaptastic, leading to the error:

Jul 18 09:57:44 ip-172-31-12-253 startup:   File "/usr/lib/python2.6/site-packages/snaptastic/snapshotter.py", line 231, in mount_snapshot
Jul 18 09:57:44 ip-172-31-12-253 startup:     self.attach_volume(ebs_volume, boto_volume)
...
Jul 18 09:57:44 ip-172-31-12-253 startup: boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
Jul 18 09:57:44 ip-172-31-12-253 startup: <?xml version="1.0" encoding="UTF-8"?>
Jul 18 09:57:44 ip-172-31-12-253 startup: <Response><Errors><Error><Code>IncorrectState</Code><Message>Instance 'i-c9e2eef4' is not 'running'.</Message></Error></Errors><RequestID>a958c6d5-95b2-4d50-a31b-edb0d771d0e6</RequestID></Response>

The fact that this script is being executed on instance i-c9e2eef4 suggests that the instance is, in fact, running :)

I suggest we add a try on this. If instance != ready, try again until max_instance_ready_wait has been reached.

@ghost ghost assigned mikery Jul 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant