Role table not upgraded to grizzly cleanly

Bug #1119789 reported by Dean Troyer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Critical
William Kelly

Bug Description

The role table has two problems in a folsom -> grizzly database migration.

Starting with a folsom keystone database (version 4) and running the grizzly keystone-manage db_sync results in a database of version 15 but the role table doesn't match a freshly created version 15 database. There are two problems...the examples below are from comparing a folsom devstack manually upgraded to grizzly and a current grizzly run so they contain the default devstack data.

The first is that the new extra column does not get properly initialized for the existing rows. It should be ampty JSON '{}'.

 LOCK TABLES `role` WRITE;
 /*!40000 ALTER TABLE `role` DISABLE KEYS */;
 -INSERT INTO `role` VALUES
  ('1c77b6a292c54b2d950ad9adda3d04cc','anotherrole',NULL),
  ('270d14dba2b24c708dca72b3d4d47192','admin',NULL),
  ('43831b701e2045cda0a075a1f56f1fe9','Member',NULL),
  ('55982562e10b4cdc9f40662f3d4ee5f1','KeystoneServiceAdmin',NULL),
  ('72e19319d1d24be9bb182f218132f839','KeystoneAdmin',NULL),
  ('cf14b1e56d3c4819ab776000e82ae1af','ResellerAdmin',NULL)
 ;
 +INSERT INTO `role` VALUES
  ('3ffc20b5518944c6b3f6f237a25c4b5c','ResellerAdmin','{}'),
  ('aae6125220814bb2bff70929ef0f4730','admin','{}'),
  ('e680c6a7ed74492e8f7f2e28681a1326','Member','{}'),
  ('f325f1de369e47ceb6a9f41e0dade469','anotherrole','{}')
 ;
 /*!40000 ALTER TABLE `role` ENABLE KEYS */;
 UNLOCK TABLES;

The second is more minor in that the size of the name column is different. This is a minor issue and will only cause problems with names > 64 chars.

 # Role table actually is different
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `role` (
    `id` varchar(64) NOT NULL,
 - `name` varchar(64) NOT NULL,
 + `name` varchar(255) NOT NULL,
    `extra` text,
    PRIMARY KEY (`id`),
    UNIQUE KEY `name` (`name`)

Revision history for this message
Kieran Spear (kspear) wrote :

See also bug #1131087

Changed in keystone:
status: New → Confirmed
Dolph Mathews (dolph)
Changed in keystone:
milestone: none → grizzly-rc1
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Critical
Sina Sadeghi (sina-sa)
tags: added: cloud-archive
Dolph Mathews (dolph)
Changed in keystone:
assignee: nobody → Will Kelly (wkelly9875)
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/23974

Changed in keystone:
assignee: Will Kelly (wkelly9875) → William Kelly (the-william-kelly)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/23974
Committed: http://github.com/openstack/keystone/commit/42bd756c30d16a3e48c7821d0a5d5433de41a506
Submitter: Jenkins
Branch: master

commit 42bd756c30d16a3e48c7821d0a5d5433de41a506
Author: William Kelly <email address hidden>
Date: Fri Mar 8 17:47:40 2013 -0600

    Fix folsom -> grizzly role table migration issues (bug 1119789)

    Change-Id: Id7e5b3354d9139afa0a69b283924f363847cef56

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: grizzly-rc1 → 2013.1
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.