← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1119789] Re: Role table not upgraded to grizzly cleanly

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1119789

Title:
  Role table not upgraded to grizzly cleanly

Status in OpenStack Identity (Keystone):
  Fix Released

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`)

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1119789/+subscriptions