Martin Pool has proposed merging lp:~mbp/launchpad/ec2-update into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~mbp/launchpad/ec2-update/+merge/81946

This makes ec2 test instances do an apt-get update, upgrade, before they start 
running the actual tests.

I've tested it here and it works and does not add much to the startup time.

In particular this lets me test out 
<https://code.launchpad.net/~mbp/launchpad/800295-delete-buildd/+merge/81815> 
without manually building a separate ami, and getting permission to make that 
api official.  Generally speaking it seems wasteful to have people repeatedly 
manually do something the computer can happily do.

Upsides:
 * less risk ami updates would go wrong
 * saves what stevenk estimates is an hour of latency updating the ami
 * less gap between what is tested, and what's used by developers and in 
deployment
 * avoids the issue of only particular people being trusted to update amis

Downsides:
 * a glitch might cause the update to fail - though that seems unlikely 
compared to all the risks of tests spuriously failing, and it can be detected 
pretty early
 * it will take a bit longer (~60s?) before the machine detaches - I think that 
is probably better handled by making the whole thing detach much earlier and 
run all the setup separately.  it is not very long as a fraction of the total 
startup time
 * possibly we'll get some failures due to incompatibilities with the 
particular versions of things in one of our ppas or in ubuntu - but it seems to 
me those problems were lurking already and this just helps us find them, which 
is probably good
-- 
https://code.launchpad.net/~mbp/launchpad/ec2-update/+merge/81946
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~mbp/launchpad/ec2-update into lp:launchpad.
=== modified file 'lib/devscripts/ec2test/testrunner.py'
--- lib/devscripts/ec2test/testrunner.py	2011-08-15 10:08:56 +0000
+++ lib/devscripts/ec2test/testrunner.py	2011-11-11 07:56:29 +0000
@@ -322,6 +322,10 @@
             # really wrong with the server or suite.
             user_connection.perform("sudo shutdown -P +%d &" % self.timeout)
         as_user = user_connection.perform
+        for ppa in 'bzr', 'bzr-beta-ppa', 'launchpad':
+            as_user("sudo add-apt-repository ppa:" + ppa)
+        as_user("sudo aptitude update")
+        as_user("sudo DEBIAN_FRONTEND=noninteractive aptitude -y full-upgrade")
         # Set up bazaar.conf with smtp information if necessary
         if self.email or self.message:
             as_user('[ -d .bazaar ] || mkdir .bazaar')

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to