Fix foreign key drop and recreation

Bug #1662624 reported by Octave Orgeron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
In Progress
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
Changed in keystone:
assignee: nobody → Octave Orgeron (octave-orgeron)
Revision history for this message
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/431229

Revision history for this message
Lance Bragstad (lbragstad) wrote : Re: MySQL Cluster support for Keystone

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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by "Gage Hugo <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/keystone/+/431229
Reason: Abandoning since there hasn't been any recent activity, if anyone wants to continue this work, please feel free to restore this or create a new change.

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.