SQL migration for sqlite broken at the 015 (tenant->project) step

Bug #1201380 reported by Henry Nash
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Henry Nash

Bug Description

During the 015 tenant->project migration, any FKs that reference the (about to be deleted) tenant table are switched to point at the new project table. However, for sqlite, the group_project_metadata table was missed and remains pointing at the old tenant table. Migrations for MySQL and Postgresql are not affected and correctly change the FKs.

This means that any future calls to load that table in migrations scripts using sqlite fails trying to load the (now deleted) tenant table. This first becomes a real problem in migration script 028 which attempts to re-structure the roles metadata - and hence this does not support migration via sqlite.

Our options are:

a) Write a special migration that goes under the cover and tries to fix up the FK for sqlite
b) We stop supporting migrations with sqlite

The real issue here is that you are limited by what kind of table modifications are supported with sqlite - which often requires a separate code path for any such table altering. It is this separate code path that was wrong in 015.

Henry Nash (henry-nash)
description: updated
Revision history for this message
Dolph Mathews (dolph) wrote :

How fast can we stop supporting sqlite migrations? ;)

Changed in keystone:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Henry Nash (henry-nash) wrote :

This was fixes as part of implementing the inherited domain roles patch.

Changed in keystone:
milestone: none → havana-2
status: Triaged → Fix Committed
assignee: nobody → Henry Nash (henry-nash)
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: havana-2 → 2013.2
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.