← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1603121] Re: db_sync doesn't work with sql_mode = 'TRADITIONAL'

 

** Changed in: keystone
       Status: Invalid => Incomplete

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1603121

Title:
  db_sync doesn't work with sql_mode = 'TRADITIONAL'

Status in OpenStack Identity (keystone):
  Incomplete

Bug description:
  Hi

  The keystone-manage db_sync command fails with the following error :

  2016-07-14 16:13:17.670 19170 ERROR keystone DBError:
  (_mysql_exceptions.ProgrammingError) (1064, 'You have an error in your
  SQL syntax; check the manual that corresponds to your MariaDB server
  version for the right syntax to use near \'"keystone"\' at line 1')
  [SQL: 'SHOW FULL TABLES FROM "keystone"']

  OS: Debian 8.5
  Keystone ver : 2:9.0.0-2~bpo8+1
  Mysql: Server version: 5.5.44-MariaDB-log MariaDB Server

  The problem seems to be related with :
  cfg.StrOpt('mysql_sql_mode',
                 default='TRADITIONAL', 

  from /usr/lib/python2.7/dist-packages/oslo_db/options.py
  It seems that on MariaDB if you set:
   set session sql_mode = 'TRADITIONAL';
  the query :
  show full tables from "keystone" 
  fails

  I've solve the problem by adding ANSI to default sql mode:
  cfg.StrOpt('mysql_sql_mode',
                 default='TRADITIONAL,ANSI',

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


References