Page MenuHomePhabricator

Resolve keystone schema errors
Closed, InvalidPublic

Description

The keystone database schema is missing updates from previous upgrades.

One instance of this is the domain_id column in the keystone.user table that should've been added during the Mitaka upgrade.

Expected schema from https://github.com/openstack/keystone/blob/master/keystone/common/sql/migrate_repo/versions/067_kilo.py

user = sql.Table(
    'user', meta,
    sql.Column('id', sql.String(length=64), primary_key=True),
    sql.Column('name', sql.String(length=255), nullable=False),
    sql.Column('extra', ks_sql.JsonBlob.impl),
    sql.Column('password', sql.String(length=128)),
    sql.Column('enabled', sql.Boolean),
    sql.Column('domain_id', sql.String(length=64), nullable=False),
    sql.Column('default_project_id', sql.String(length=64)),
    mysql_engine='InnoDB',
    mysql_charset='utf8')

In both CODFW1DEV and EQIAD1 we have:

+--------------------+-------------+------+-----+---------+-------+
| Field              | Type        | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| id                 | varchar(64) | NO   | PRI | NULL    |       |
| extra              | text        | YES  |     | NULL    |       |
| enabled            | tinyint(1)  | YES  |     | NULL    |       |
| default_project_id | varchar(64) | YES  |     | NULL    |       |
| created_at         | datetime    | YES  |     | NULL    |       |
| last_active_at     | date        | YES  |     | NULL    |       |
+--------------------+-------------+------+-----+---------+-------+

Event Timeline

aborrero triaged this task as High priority.Oct 9 2019, 2:14 PM
aborrero moved this task from Inbox to Soon! on the cloud-services-team (Kanban) board.

This was a false alarm... The domain_id column was removed in a later revision: https://github.com/openstack/keystone/blob/master/keystone/common/sql/migrate_repo/versions/091_migrate_data_to_local_user_and_password_tables.py#L82

I loaded up a fresh keystone database schema and confirmed that we're in sync.