~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/devscripts/ec2test/testrunner.py

  • Committer: Steve Kowalik
  • Date: 2011-08-15 08:56:31 UTC
  • mto: This revision was merged to the branch mainline in revision 13692.
  • Revision ID: stevenk@ubuntu.com-20110815085631-rfwr9mqc2ufkpkgw
Make use of shutdown rather than at to kill the ec2 instance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
320
320
        if self.timeout is not None:
321
321
            # Activate a fail-safe shutdown just in case something goes
322
322
            # really wrong with the server or suite.
323
 
            #
324
 
            # We need to use a call to /usr/bin/at here instead of a call to
325
 
            # /sbin/shutdown because the test suite already uses the shutdown
326
 
            # command after the suite finishes. If we called shutdown
327
 
            # here, it would prevent the end-of-suite shutdown from executing,
328
 
            # leaving the server running until the failsafe finally activates.
329
 
            # See bug 617598 for the details.
330
 
            user_connection.perform(
331
 
                "echo sudo shutdown -h now | at today + %d minutes"
332
 
                % self.timeout)
 
323
            user_connection.perform("sudo shutdown -P +%d" % self.timeout)
333
324
        as_user = user_connection.perform
334
325
        # Set up bazaar.conf with smtp information if necessary
335
326
        if self.email or self.message: