test_db_sync_downgrade_then_upgrade fails no such index: ix_images_deleted

Bug #737990 reported by Ewan Mellor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Jay Pipes

Bug Description

test_db_sync_downgrade_then_upgrade fails with

OperationalError: (OperationalError) no such index: ix_images_deleted u'\nDROP INDEX ix_images_deleted' ()

when using virtualenv on Ubuntu 10.10 and lp:glance revno 90.

Note that https://bugs.launchpad.net/glance/+bug/731030 is superficially similar, but the failure mode and environment are different.

Note also that Jay Pipes seems to have reported something along these lines against sqlalchemy-migrate: http://code.google.com/p/sqlalchemy-migrate/issues/detail?id=117.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Yup, and not a single comment back from any of the SA-migrate people. It's been very frustrating. :(

The reason this happens is two-fold: SQLite does not support DROP COLUMN and sa-migrate attempts to work around this with a hack that creates a temporary table with the new schema and then drops the old one.

I'm working on the whole migration functionality in a branch. Hopefully, we'll have this resolved soon...

Note that we've been unable to reproduce this in any non-SQLite data store. If you've seen this happen in MySQL or PostgreSQL, please do let us know!

Revision history for this message
Jay Pipes (jaypipes) wrote :

Ewan, would you mind verifying this bug again now that the fixes for migration scripts are in trunk? Thanks!

Changed in glance:
status: New → Incomplete
Revision history for this message
Ewan Mellor (ewanmellor) wrote :

Verified fixed as of lp:glance revno 100. Note that the cited unit test (test_db_sync_downgrade_then_upgrade) has gone, but I can confirm that all the TestMigrations tests are passing in my environment.

Changed in glance:
status: Incomplete → Fix Committed
Jay Pipes (jaypipes)
Changed in glance:
importance: Undecided → High
assignee: nobody → Jay Pipes (jaypipes)
milestone: none → cactus-2011-04-07
Thierry Carrez (ttx)
Changed in glance:
milestone: cactus-2011-04-07 → 2011.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.