Fix foreign key drop and recreation

Bug #1662624 reported by Octave Orgeron on 2017-02-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Wishlist
Steve Noyes

Bug Description

There are two migration scripts in Keystone that make table changes without dropping and recreating foreign key constraints. This causes problems with portability with other MySQL database types, in particular MySQL Cluster (NDB), which requires strict adherence to ACID model. The two scripts are:

012_contract_add_domain_id_to_idp.py
015_contract_update_federated_user_domain.py

This fix follows the methods already in use in Keystone for properly handling the dropping and recreation of foreign keys around table changes which are in:

014_contract_add_domain_id_to_user_table.py
092_make_implied_roles_fks_cascaded.py

This fix adds the get_fk_name to the upgrades module, making it available across Keystone. The plan is to eventually add this function to oslo.db and make it available across OpenStack to help with these operations.

Tags: sql Edit Tag help
Changed in keystone:
assignee: nobody → Octave Orgeron (octave-orgeron)
Steve Martinelli (stevemar) wrote :

Thanks for the initial diagnosis Octave!

Changed in keystone:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: sql
Changed in keystone:
status: Confirmed → In Progress

Automatically unassigning due to inactivity.

Changed in keystone:
assignee: Octave Orgeron (octave-orgeron) → nobody
status: In Progress → Triaged
status: Triaged → In Progress
assignee: nobody → Octave Orgeron (octave-orgeron)
Lance Bragstad (lbragstad) wrote :

Reassigning since this is being worked in review and generating a lot of discussion.

summary: - MySQL Cluster support for Keystone
+ Fix foreign key drop and recreation
description: updated
Changed in keystone:
assignee: Octave Orgeron (octave-orgeron) → Murali (muralilaunchpad)
Lance Bragstad (lbragstad) wrote :

Automatically unassigning due to inactivity.

Changed in keystone:
assignee: Murali Annamneni (murali.annamneni) → nobody
Changed in keystone:
assignee: nobody → Steve Noyes (steve-noyes)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers