[openstack-dev] DB Migration Testing

Monty Taylor mordred at inaugust.com
Wed Sep 19 13:18:24 UTC 2012



On 09/18/2012 09:57 PM, Brian Waldon wrote:
> It has become painfully obvious over the past few weeks that we aren't
> testing our database migrations nearly well enough. Dean Troyer and
> myself have found several show-stopping bugs [1] [2] [3] [4] [5] [6] by
> simply applying the migrations to a running Essex system. I'd like to
> propose two things to prevent this from cropping up in the future:
> 
> 1) Migrations must come with a test that exercises the database
> modifications with pre-loaded fixture test data. For examples of these
> tests see [7] and [8].
> 2) Run migration tests on a functional mysql backend in Jenkins.

I agree wholeheartedly with this. We were doing this for a while, but it
stopped when we moved MySQLdb into test-options from test-requires. That
being said - we do have most the bits added back to be able to add a
test run which runs against a functional mysql backend.

> I am concerned that there are hidden bugs in the existing migrations; to
> address this I'd like to propose a third action:
> 
> 3) Revisit existing migrations and add the appropriate testing where
> necessary
> 
> If anybody has any additional suggestions, please throw them out there!
> If this all sounds sane, I'll start pushing to make it happen.
> 
> Waldon
> 
> [1] https://bugs.launchpad.net/nova/+bug/1047633
> [2] https://bugs.launchpad.net/nova/+bug/1047665
> [3] https://bugs.launchpad.net/nova/+bug/1052220
> [4] https://bugs.launchpad.net/nova/+bug/1052244
> [5] https://bugs.launchpad.net/nova/+bug/1052252
> [6] https://bugs.launchpad.net/glance/+bug/1043041
> [7] https://github.com/openstack/nova/blob/0ffff7c490d54f9b932df4b2dcd62158242dae2a/nova/tests/test_migrations.py#L307
> [8] https://github.com/openstack/nova/blob/0ffff7c490d54f9b932df4b2dcd62158242dae2a/nova/tests/test_migrations.py#L327
> 
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 



More information about the OpenStack-dev mailing list