Handling ec2 terminated hosts


#1

Hi

I was wondering if there are best practices for handling terminated
instances on ec2. When an instance dies unexpectedly it’s still registered
with chef server. Currently I’m running a script that lists all registered
instances and all running ec2 instances and compares them. Although it’s
working, I was wondering if there are better ways to handle this.

Thanks in advance

Haim


#2

Basically that’s what I do. Here’s my version. Would love to know if anyone has any improvements:

On Sep 4, 2011, at 9:33 PM, Haim Ashkenazi wrote:

Hi

I was wondering if there are best practices for handling terminated instances on ec2. When an instance dies unexpectedly it’s still registered with chef server. Currently I’m running a script that lists all registered instances and all running ec2 instances and compares them. Although it’s working, I was wondering if there are better ways to handle this.

Thanks in advance

Haim


#3

Very nice, Alex!

I have a very crude blunt instrument that runs “knife {node,client,ec2 server} delete” on an instance ID. I think I like your’s for practical use better :-).

On Sep 4, 2011, at 11:22 PM, Alex Soto wrote:

Basically that’s what I do. Here’s my version. Would love to know if anyone has any improvements:

https://gist.github.com/1194158

On Sep 4, 2011, at 9:33 PM, Haim Ashkenazi wrote:

Hi

I was wondering if there are best practices for handling terminated instances on ec2. When an instance dies unexpectedly it’s still registered with chef server. Currently I’m running a script that lists all registered instances and all running ec2 instances and compares them. Although it’s working, I was wondering if there are better ways to handle this.

Thanks in advance

Haim


Opscode, Inc
Joshua Timberman, Director of Training and Services
IRC, Skype, Twitter, Github: jtimberman