[Buildbot-devel] Upgrade from 7.x to 8.x and mysql database

Dustin J. Mitchell dustin at v.igoro.us
Wed Nov 21 18:16:13 UTC 2012


On Tue, Nov 20, 2012 at 2:11 AM, Andy Salnikov <a_salnikov at yahoo.com> wrote:
> Hi all,
> I am trying to upgrade our system from 7.12 to 8.7 and there is on minor
> issue that I want to understand related to changes.

Neither of those have been released yet!  I assume you mean 0.7.12 and 0.8.7 ;)

> For upgrade I decided to use MySQL database on our production MySQL server,
> so I created a new database with default 'utf8' character set and all
> necessary
> credentials, then updated master config file to include this database into
> configuration. The upgrade command ran successfully, no crashes or errors:
>
> -bash-3.2$ buildbot upgrade-master master-basedir
> checking basedir
> checking for running master
> checking master.cfg
> upgrading basedir
> creating templates  master-basedir/public_html/robots.txt has
> old/modified contents
>   writing new contents to master-basedir/public_html/robots.txt.new
> master-basedir/master.cfg.sample has old/modified contents
>   overwriting it with new contents
> Notice: Moving master-basedir/public_html/index.html to
> master-basedir/templates/root.html.
>          You can (and probably want to) remove it if you haven't
> modified this file.
> upgrading database (mysql://user:password@server/database?max_idle=600)
> upgrade complete
>
> (some things were edited of course).
>
> Before the upgrade master directory had non-empty changes.pck file which
> was renamed to changes.pck.old after upgrade. That I presume would mean
> that all changes we saved successfully in the database. However when I dump
> database contents it is mostly empty, the is just one record in
> migrate_version
> table, all other tables are completely empty.
>
> When I start the master I can connect to it through the web status page and
> see usual things there but it looks like all changes have disappeared, I
> guess this
> is because database does not have anything in changes table.
>
> What one should expect for the content of the database after upgrade, is
> it OK
> that all tables (and changes table in particular) are empty? I would
> prefer to keep
> old changes, is it possible to recover this somehow and add to database?

That is odd!  You can certainly run it again by dropping and
re-creating the database and then moving changes.pck.old back to
changes.pck.

I'm not sure why this would happen.  If you ran the upgrade a few
times, it's possible it got run once against sqlite, then *again*
(after changes.pck was moved) against  mysql.

Dustin




More information about the devel mailing list