Handling ec2 terminated hosts

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

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

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:

Chef EC2 Node Cleanup task · GitHub

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