Skip to content

Commit

Permalink
Merge remote-tracking branch 'lorentz/master'
Browse files Browse the repository at this point in the history
* lorentz/master:
  Tests for buildbot.status.logfile.LogFile (incomplete)
  Terminate EC2 instances instead of stopping them.
  • Loading branch information
djmitche committed Jul 25, 2011
2 parents ddd828b + b31aecd commit 407ad39
Show file tree
Hide file tree
Showing 6 changed files with 455 additions and 116 deletions.
8 changes: 8 additions & 0 deletions master/NEWS
Expand Up @@ -5,6 +5,11 @@ Major User visible changes in Buildbot. -*- outline -*-

* Next Version

** EC2 instances are now terminated instead of stopped.

This is really only relevant for EBS-backed instances, as Buildbot will now
free the instance and associated EBS storage when shutting down the slave.

** SQLite databases use write-ahead logging

WAL mode offers much greater concurrency (preventing the dreaded 'database is
Expand All @@ -18,6 +23,9 @@ longer tracks master instances, so the unclaimOldIncarnationRequests method has
been removed. Note that several of the methods in this module now perform
fewer consistency checks, for efficiency.

*** Upgrades directly from versions older than 0.6.5 will no longer
automatically migrate logfiles.

** Customizable validation regexps

The global c['validation'] parameter can be used to adjust the regular
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/ec2buildslave.py
Expand Up @@ -295,7 +295,7 @@ def _stop_instance(self, instance, fast):
self.conn.disassociate_address(self.elastic_ip.public_ip)
instance.update()
if instance.state not in (SHUTTINGDOWN, TERMINATED):
instance.stop()
instance.terminate()
log.msg('%s %s terminating instance %s' %
(self.__class__.__name__, self.slavename, instance.id))
duration = 0
Expand Down
15 changes: 0 additions & 15 deletions master/buildbot/status/build.py
Expand Up @@ -384,21 +384,6 @@ def upgradeToVersion3(self):
self.properties.update(propdict, "Upgrade from previous version")
self.wasUpgraded = True

def upgradeLogfiles(self):
# upgrade any LogFiles that need it. This must occur after we've been
# attached to our Builder, and after we know about all LogFiles of
# all Steps (to get the filenames right).
assert self.builder
for s in self.steps:
for l in s.getLogs():
if l.filename:
pass # new-style, log contents are on disk
else:
logfilename = self.generateLogfileName(s.name, l.name)
# let the logfile update its .filename pointer,
# transferring its contents onto disk if necessary
l.upgrade(logfilename)

def checkLogfiles(self):
# check that all logfiles exist, and remove references to any that
# have been deleted (e.g., by purge())
Expand Down
2 changes: 0 additions & 2 deletions master/buildbot/status/builder.py
Expand Up @@ -230,8 +230,6 @@ def getBuildByNumber(self, number):
log.msg("re-writing upgraded build pickle")
build.saveYourself()

# handle LogFiles from after 0.5.0 and before 0.6.5
build.upgradeLogfiles()
# check that logfiles exist
build.checkLogfiles()
return self.touchBuildCache(build)
Expand Down

0 comments on commit 407ad39

Please sign in to comment.