When trying to perform a db migration barbican when using Mariadb 10.2 the following problem is observed
2017-11-23 21:06:38.402 7848 WARNING oslo_db.sqlalchemy.engines [-] MySQL SQL mode is 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION', consider enabling TRADITIONAL or STRICT_ALL_TABLES: Empty
2017-11-23 21:06:38.404 7848 INFO alembic.runtime.migration [-] Context impl MySQLImpl.
2017-11-23 21:06:38.404 7848 INFO alembic.runtime.migration [-] Will assume non-transactional DDL.
2017-11-23 21:06:38.416 7848 INFO alembic.runtime.migration [-] Running upgrade 30dba269cc64 -> 6a4457517a3, rename ACL creator_only to project_access
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (pymysql.err.InternalError) (1054, u"Unknown column 'creator_only' in 'CHECK'") [SQL: u'ALTER TABLE secret_acls CHANGE creator_only project_access BOOL NULL']: InternalError: (1054, u"Unknown column 'creator_only' in 'CHECK'")
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters context)
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/pymysql/cursors.py", line 166, in execute
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters result = self._query(query)
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/pymysql/cursors.py", line 322, in _query
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters conn.query(q)
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/pymysql/connections.py", line 856, in query
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/pymysql/connections.py", line 1057, in _read_query_result
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters result.read()
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/pymysql/connections.py", line 1340, in read
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters first_packet = self.connection._read_packet()
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/pymysql/connections.py", line 1014, in _read_packet
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters packet.check_error()
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters err.raise_mysql_exception(self._data)
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters File "/openstack/venvs/barbican-testing/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters raise errorclass(errno, errval)
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters InternalError: (1054, u"Unknown column 'creator_only' in 'CHECK'")
2017-11-23 21:06:38.431 7848 ERROR oslo_db.sqlalchemy.exc_filters
ERROR: (pymysql.err.InternalError) (1054, u"Unknown column 'creator_only' in 'CHECK'") [SQL: u'ALTER TABLE secret_acls CHANGE creator_only project_access BOOL NULL']
The problem is with Mariadb 10.2 and the new CHECK constraint was reported in July 2017
http://lists.openstack.org/pipermail/openstack-dev/2017-July/120035.html
There is also the following upstream report
https://jira.mariadb.org/browse/MDEV-13508
The original post in the mailing list already proposes some ways to deal with this problem.
We see this in OpenStack-Helm, and have reverted to MariaDB 10.1 until this is resolved: https:/ /review. openstack. org/#/c/ 533044/