This ticket is a migrated Trac ticket 2991
People contributed to the original ticket: @rutsky, @rutsky, @sa2ajj, benoit.allard@...
Ticket created on: Oct 31 2014
Ticket last modified on: Jan 31 2016
When the database specified in c['db'] does not exist or empty, the user gets a confusing error message:
The Buildmaster database needs to be upgraded before this version of
buildbot can run. Use the following command-line
buildbot upgrade-master path/to/master
to upgrade the database, and try starting the buildmaster again. You may
want to make a backup of your buildmaster before doing so.
One of the users suggested on [[IRC|http://irclogs.jackgrigg.com/irc.freenode.net/buildbot/2014-10-31#i_3484303]] that buildbot start should stop and complain about the missing database as it does about missing master.cfg
On a related note (maybe it's worth a separate ticket), after Buildbot complains about it, there's a SQLite database created in the master directory, which added to the confusion (and the file mode is different from what create-master produces: 0600 (former) vs 0644 (latter)).
Comment from: @ben
Date: Oct 31 2014
I don't believe we can do much about that.
This situation occurs because the user deleted the sqlite db from the buildbot directory. Buildbot doesn't expects the database not to be there when the master.cfg is there, hence doesn't care about checking for its presence (which is highly DB-backend dependent !).
the user brought an inconsistent state in the buildbot directory, and expected buildbot to fix it itself.
Note that a 'upgrade-master' is enough to fix the situation, not (as in this ticket) a start + upgrade-master, as the start will try to start, complains about the db in an inconsistent state, and refer to the upgrade-master command. In the meantime, the sqlite db have been created, and is confusing the upgrade-master command which will exit with the following error:
sqlalchemy.exc.[[OperationalError]]: ([[OperationalError]]) disk I/O error 'PRAGMA table_info("migrate_version")' ()
Comment from: @sa2ajj
Date: Oct 31 2014
I am inclined to disagree that we can't do much about it.
A couple of ideas:
- make sure that the SQLite database exists when 'buildbot start' is executed (so it's not created when it was not there)
- differentiate between an empty database and a database that needs an upgrade
The main point of the complaint (as far as I understand and I agree) is that the message is a bit misleading and does not give clear instructions what to do next.
This ticket is a migrated Trac ticket 2991
People contributed to the original ticket: @rutsky, @rutsky, @sa2ajj,
benoit.allard@...Ticket created on:
Oct 31 2014Ticket last modified on:
Jan 31 2016When the database specified in
c['db']does not exist or empty, the user gets a confusing error message:One of the users suggested on [[IRC|http://irclogs.jackgrigg.com/irc.freenode.net/buildbot/2014-10-31#i_3484303]] that
buildbot startshould stop and complain about the missing database as it does about missingmaster.cfgOn a related note (maybe it's worth a separate ticket), after Buildbot complains about it, there's a SQLite database created in the master directory, which added to the confusion (and the file mode is different from what
create-masterproduces: 0600 (former) vs 0644 (latter)).Comment from: @ben
Date:
Oct 31 2014I don't believe we can do much about that.
This situation occurs because the user deleted the sqlite db from the buildbot directory. Buildbot doesn't expects the database not to be there when the master.cfg is there, hence doesn't care about checking for its presence (which is highly DB-backend dependent !).
the user brought an inconsistent state in the buildbot directory, and expected buildbot to fix it itself.
Note that a 'upgrade-master' is enough to fix the situation, not (as in this ticket) a start + upgrade-master, as the start will try to start, complains about the db in an inconsistent state, and refer to the upgrade-master command. In the meantime, the sqlite db have been created, and is confusing the upgrade-master command which will exit with the following error:
Comment from: @sa2ajj
Date:
Oct 31 2014I am inclined to disagree that we can't do much about it.
A couple of ideas:
The main point of the complaint (as far as I understand and I agree) is that the message is a bit misleading and does not give clear instructions what to do next.