← Back to team overview

launchpad-dev team mailing list archive

Re: ec2 instances not shutting down

 

On 08/13/2010 10:39 AM, Jonathan Lange wrote:
On Fri, Aug 13, 2010 at 3:37 PM, Guilherme Salgado
<salgado@xxxxxxxxxxxxx>  wrote:
On Fri, 2010-08-13 at 14:42 +0100, Jonathan Lange wrote:
On Fri, Aug 13, 2010 at 3:53 AM, Tim Penhey<tim.penhey@xxxxxxxxxxxxx>  wrote:
Hi All,

I've had a number of situations where an ec2 instance hasn't shut down after
it has sent out the email.  The instance was still running almost two hours
after sending the email.


According to Bazaar, the code that does this hasn't changed recently.
The most likely candidate is a 2010-07-25 change (r11224) that times
out the server using "shutdown +TIMEOUT" rather than a call to "at".

Well, the timeout is set to 8h and the test suite takes around 3h IIRC,
so the shutdown wouldn't have kicked in when Tim noticed the instance
was still running.

This is not the code responsible for terminating the instances, though
-- it was added to prevent these rogue instances from being kept running
for too long.  Maybe we can change the timeout to 6h or maybe even 5h?


Yeah, I didn't think it was a very likely candidate, just the most
likely of a poor bunch.



So it turns out you can't call 'shutdown -P now' if another call to shutdown is already running. ec2 test calls 'shutdown -P now' after the test suite finishes, but the call fails because the failsafe shutdown is still running. The failsafe shutdown wins, and the server stays up for the full 8 hours.

A patch is forthcoming.

--
Māris Fogels -- https://launchpad.net/~mars
Launchpad.net -- cross-project collaboration and hosting



References