Bug 1404054 - beakerd runs all data migrations unnecessarily on an empty, freshly created database
Summary: beakerd runs all data migrations unnecessarily on an empty, freshly created d...
Alias: None
Product: Beaker
Classification: Community
Component: general
Version: 23
Hardware: Unspecified
OS: Unspecified
low vote
Target Milestone: 24.2
Assignee: matt jia
QA Contact: tools-bugs
Keywords: EasyFix, Patch, Triaged
Depends On:
TreeView+ depends on / blocked
Reported: 2016-12-13 00:05 UTC by Dan Callaghan
Modified: 2017-03-30 03:23 UTC (History)
4 users (show)

Clone Of:
Last Closed: 2017-03-30 03:23:01 UTC

Attachments (Terms of Use)

Description Dan Callaghan 2016-12-13 00:05:55 UTC
Version-Release number of selected component (if applicable):

How reproducible:
with a fresh install

Steps to Reproduce:
1. Make a fresh Beaker installation, or at least start from an empty database populated by beaker-init
2. Start beakerd
3. Look in the beakerd logs

Actual results:
Dec 13 09:57:02 belljar.usersys.redhat.com beakerd[18100]: bkr.server.tools.beakerd DEBUG Incomplete data migrations will be run: commands-for-recipe-installations

Expected results:
There should be no reason to bother doing this data migrations, there is nothing to migrate.

Additional info:
The migration itself is harmless and takes no time when the database is empty, but it creates extra noise and looks strange. beaker-init should just mark all known migrations as already-completed when it is populating a new database from scratch, so that they are not attempted.

Comment 1 matt jia 2017-02-07 06:10:13 UTC
On Gerrit:

Comment 2 Roman Joost 2017-03-06 23:56:51 UTC
We'll have to do QE on the items before we can tag a release.

Comment 3 Roman Joost 2017-03-14 05:55:56 UTC
Tested on my own beaker installation (Beaker 24.2.git.9.d4c983d).


1. Created new database (beaker_test) and gave permissions to 'beaker'@'localhost'
2. Changed /etc/beaker/server.cfg to point to the newly created database.
3. Run beaker-init: beaker-init --user=admin --password=xxxx -e rjoost@redhat.com
4. Stop beakerd with: service beakerd stop
5. Run beakerd in foreground:
# /usr/bin/beakerd -f
2017-03-14 06:46:41,369 bkr.server.tools.beakerd DEBUG starting main recipes thread

No incomplete data migration messages have been observed.

Furthermore querying the database:

select * from data_migration;
| id | name                              | finish_time         |
|  1 | commands-for-recipe-installations | 2017-03-14 10:46:02 |
1 row in set (0.00 sec)

Shows that the migration has a finish time.

Comment 4 Dan Callaghan 2017-03-30 03:23:01 UTC
Beaker 24.2 has been released.

Note You need to log in before you can comment on or make changes to this bug.