2017-08-09 17:20:28 |
Octave Orgeron |
description |
There is a new spec and blueprint to add MySQL Cluster (NDB) support to OpenStack services:
https://blueprints.launchpad.net/oslo.db/+spec/mysql-cluster-support
This bug will be used to track the work for adding NDB support to Keystone. This will entail patching Keystone to support the following:
1. Enable mysql_storage_engine configuration from oslo.db to allow operators to select InnoDB (Default) or NDB for their MySQL storage engine.
2. Patch SQL Alchemy and/or Alembic database migration scripts to have logic to modify table schemas and behavior to fit within the constraints of MySQL Cluster (NDB). For example, change the column size 255 char strings to something smaller for columns that only hold the state of a service component that consumes less than 10 or 20 characters. Or converting large string columns (i.e. over 1024 chars.) to TEXT to reduce the size of the row length.
3. Patch SQL Alchemy and/or Alembic database migration scripts to properly handle the ordering of operations against foreign keys, constraints, and indexes.
4. Patch service components to transparently work with any MySQL Cluster (NDB) changes. This includes database related api.py and model.py files for handling schema modifications or hard-coded use cases or features (savepoints and nested).
Based on prior experience patching the Keystone Kilo and Mitaka releases for Oracle Linux OpenStack and Oracle Solaris OpenStack, the impact on Keystone will be minimal and focused on using substitution to replace hard coded "mysql_engine=" statements with a value from cfg.CONF.database.mysql_storage_engine. |
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. |
|