Bug 1197917 - tests fail because alembic_version can be created in MyISAM if that is the server default
Summary: tests fail because alembic_version can be created in MyISAM if that is the se...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: general
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 20.2
Assignee: Dan Callaghan
QA Contact: Dan Callaghan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-03 00:34 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-14 08:04:51 UTC


Attachments (Terms of Use)

Description Dan Callaghan 2015-03-03 00:34:35 UTC
Description of problem:
For all Beaker's database tables we explicitly specify that the MySQL storage engine must be InnoDB. That way the tables are always in InnoDB regardless of the server's configured default storage engine.

However alembic_version is created by alembic, not by Beaker code explicitly, and so it does not specify a storage engine. We should either find a way to make Alembic specify InnoDB, or (in the worst case) update all our docs to reflect the requirement that InnoDB be configured as the default storage engine.

Version-Release number of selected component (if applicable):
19.2

Steps to Reproduce:
1. Configure a MySQL server with MyISAM as the default storage engine. (On RHEL6 mysql-server this is the default, just comment out any default-storage-engine setting in my.cnf.)
2. Create a new empty database, and configure Beaker to use it.
3. Run beaker-init to populate the new database.
4. Check which storage engine is used for the alembic_version table, by using: SHOW CREATE TABLE alembic_version;

Actual results:
MyISAM

Expected results:
InnoDB

Comment 1 Dan Callaghan 2015-03-03 00:36:00 UTC
On second thought, we could also just relax the check in test_all_tables_use_innodb to ignore alembic_version. There is probably no harm in letting alembic_version be on MyISAM (or any other storage engine) since we don't rely on any ACID properties or high performance or anything for that table -- it is only read and written when beaker-init is invoked.

Comment 2 Dan Callaghan 2015-03-03 00:38:37 UTC
This wasn't caught by the dogfood job, because it configures default-storage-engine=innodb.

If we go with this option:

(In reply to Dan Callaghan from comment #0)
> or (in the worst case) update all
> our docs to reflect the requirement that InnoDB be configured as the default
> storage engine.

then we can leave dogfood as is, but otherwise we should remove the default-storage-engine=innodb line from the dogfood job definition.

Comment 3 Dan Callaghan 2015-04-23 03:22:54 UTC
So Alembic doesn't offer any way to customise the table definition for alembic_version, and it doesn't really seem worth patching it to allow that. As per comment 1 we can just leave alembic_version on MyISAM and make the test skip it.

Patch to make setup leave the default storage engine unset:
https://git.beaker-project.org/cgit/beaker-meta-tasks/commit/?id=dea42e012f4f47d2d4f902dfc9621ae4f3a48e3e

Patch to make the tests ignore the MySQL storage engine for alembic_version:
http://gerrit.beaker-project.org/4186

Comment 4 Dan Callaghan 2015-04-24 05:50:11 UTC
This bug fix is included in beaker-server-21.0-0.git.8.0ec1fde.el6eng which is currently available for download here:

https://beaker-project.org/nightlies/develop/

Comment 5 Dan Callaghan 2015-04-28 05:21:54 UTC
As per comment 3 we decided not to actually worry about which storage engine is used for alembic_version, this bug is just about the test suite failure when MyISAM is used. So marking this VERIFIED based on the fact that the tests are passing with the above two patches.

Comment 6 Dan Callaghan 2015-07-14 08:04:51 UTC
Beaker 20.2 has been released.


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