[Buildbot-devel] upgrading to 0.4.3: try doing it in place
Brian Warner
warner at lothar.com
Sat May 1 20:38:43 UTC 2004
I changed the contents of a few classes in between 0.4.2 and 0.4.3, and some
of these are persistent (they are stored in the buildbot-shutdown.tap file).
Twisted provides some tools to handle upgrades like this smoothly, and I've
been trying to learn how to use them in the last few months. I think I got it
right for the 0.4.2->0.4.3 transition, so I'd love to hear about any problems
you encounter while upgrading.
The traumatic-upgrade process looks like this:
stop the old buildmaster: kill `cat twistd.pid`
(this saves the old state out to a file named buildbot-shutdown.tap,
but we ignore that so you can delete it)
delete the old swapped-out build logs by deleting the various directories
under the buildmaster's base directory. These logs are referenced by
pointers in the buildbot-shutdown.tap file, and if we aren't using the
shutdown .tap then we might as well delete the unreachable log data.
generate a new .tap file: mktap buildbot master .. (as described in
the README file). This creates a buildbot.tap file.
launch the new .tap: twistd -f buildbot.tap
That process will always work, but of course it will also blow away your
archived build events (the waterfall display will be blank until you do a new
build or two). The ideal is to upgrade the buildmaster in place, without
losing the history information. To accomplish that, do this instead:
stop the old buildmaster: kill `cat twistd.pid`
restart it: twistd -f buildbot-shutdown.tap
The various buildbot libraries are loaded when the buildmaster is first
started, so assuming you've done a 'setup.py install' of the new buildbot
release first, the new buildmaster will use the new code instead of the old
version. The -shutdown.tap is saved by the old code, and then loaded by the
new code. Each saved object should (theoretically) get upgraded as it is
loaded by the new buildmaster. When you next shutdown the buildmaster,
new-style objects should be saved out to the -shutdown.tap file.
So when you upgrade to 0.4.3, please try doing it "in place" by restarting
the buildbot-shutdown.tap file, instead of generating a brand-new .tap
file with mktap. Take a look at the twistd.log file as the new master starts
up and look for anything unusual (specifically any exceptions, probably
AttributeErrors which complain about missing instance attributes). Use the
web interface to look at a couple of build logs and make sure they display
properly.
If you see anything weird, please let me know. It would be helpful to have a
copy of the buildbot-shutdown.tap file to reproduce the error, so make a copy
of it first (it will be overwritten when the new buildmaster exits).
I think it ought to upgrade cleanly, but of course it can always use more
testing, and the various Buildbot installations out there are the best place
for those tests to take place.
thanks,
-Brian
More information about the devel
mailing list