CHECK constraint bug in db migration on Mariadb 10.2

Bug #1734329 reported by Markos Chandras
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Barbican
Won't Fix
Undecided
Unassigned

Bug Description

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.

Revision history for this message
Pete Birley (portdirect) wrote :

We see this in OpenStack-Helm, and have reverted to MariaDB 10.1 until this is resolved: https://review.openstack.org/#/c/533044/

Revision history for this message
Eric Harney (eharney) wrote :

I hit this on Jan 15, 2018 with a fresh devstack deployment on Fedora 27.

devstack @ 67d26e216
barbican @ 0539a28ee
mariadb-server-10.2.9-3.fc27.x86_64

Revision history for this message
daniel.pawlik (daniel-pawlik) wrote :

Problem disapear in MariaDB 10.2.13.

Revision history for this message
daniel.pawlik (daniel-pawlik) wrote :
Revision history for this message
Nam (namnh) wrote :

Currently, the version of mariadb in the barbican-dogtag-devstack-functional-fedora-27 is 10.2.12. And there is a bug for this version. That why devstack cannot upgrade Barbican database. The bug was fixed at 10.2.13 [1]. So we just need to wait for fedora27 using this version.

[1] https://jira.mariadb.org/browse/MDEV-13508

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged
Download full text (17.9 KiB)

Reviewed: https://review.opencontrail.org/42067
Committed: http://github.com/Juniper/openstack-helm/commit/dca1f14a130a46d5805aa1d267a2116a589b7db2
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit dca1f14a130a46d5805aa1d267a2116a589b7db2
Author: Madhukar Nayakbomman <email address hidden>
Date: Wed Apr 18 00:15:59 2018 -0700

Rebasing openstack-helm repo

Changes from below commits are been added as part of rebase

Cinder: allow Ceph RBD pool params to be tuned

This PS exposes the Ceph RBD pool params to the cinder chart, allowing
them to be tuned.

Change-Id: I615e999928948193b24cc4978efb31bd1b36f8f7

Armada check: Enable storage for OSH-infra services

This enables storage for the osh-infra services running in the
armada job

Change-Id: Ic0f11a9d161529c6fb58474e856032745b07a032

remove trailing ws

Change-Id: Ida8e4a5d072f8dff635dfffd4336d697ab1d4753

Add ldap support

This patch set adds python ldap support to keystone.

Change-Id: I420612555d92f6fb932f2f210cc36f3f7f5afc97
Signed-off-by: Tin Lam <email address hidden>

Reduce the number of workers spawned by services

This PS reduces the number of processes spawned by services, as
with Kubernetes load distribution can be better managed by a larger
number of single threaded pods (up to a certain point) and doing so
also provides both increased avilibility, leading to smoother rolling
updates. In addtion when running single replicas resource consuption
is reduced.

Change-Id: Ifb7494a0804913d843a072e10d26c6ec53c3bd16

DB-Drop-Jobs: consolidate to helm-toolkit

This PS consolidates the DB-Drop Job to helm-toolkit.

Change-Id: Ia2b035d730bf612086a9fd9b5d14aba494f56dc7

Add trustee domain

This patch set allows for searching the trustee user in a specified
domain rather than just the "default" domain.

Change-Id: I53ee6816e02c25e577244015fe5aea0870e0fd32
Signed-off-by: Tin Lam <email address hidden>

Add Makefile

This patchset adds a Makefile for each component under tools/images

Change-Id: I84d8bda0313e921f0921dfef10d14469ed26ff5c

Ingress controller service: consolidate to helm-toolkit

This PS consolidates the Ingress controller service, that is used
to resolve internal requests to public endpoints correctly, to
helm-toolkit.

Change-Id: If7c7deca1b8289a32709f7dc7c936883469aadfe

Cinder: Fix sudoers reference in configmap

The cinder_sudoers entry in the cinder configmap-etc was consuming
the neutron_sudoers entry in the values.yaml. This corrects it to
point at cinder_sudoers instead

Change-Id: I214912b3ed4185a201f4f94e82eaa50d6d321018

Cinder: Fix default uid for cinder user with loci images

This PS corrects the UID for the cinder user used with loci images
in the cinder chart.

Change-Id: I1001711928fb47e77f01c8e83f88ec317a46498e

glance-api: add dependency on message bus

without this the api starts up in a non-working state, the bootstrap
job then runs and give is images which are stuck queued

Change-Id: Ie3e03620618b1c46882c05b3a5ef8745c78af6a3

Neutron: SR-IOV support

This PS adds SR-IOV Support to OSH.

Change-Id: Ia744c6d7c4a45be7728bba3213b50f1246b897db

Cinder: add qemu profile to cinder images

This PS adds the qemu profile to cinder images...

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :
Download full text (17.9 KiB)

Reviewed: https://review.opencontrail.org/42211
Committed: http://github.com/Juniper/openstack-helm/commit/94b2d9580cfaf0efdb2f74e80d3f9f623058dc00
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 94b2d9580cfaf0efdb2f74e80d3f9f623058dc00
Author: Madhukar Nayakbomman <email address hidden>
Date: Wed Apr 18 00:15:59 2018 -0700

Rebasing openstack-helm repo

Changes from below commits are been added as part of rebase

Cinder: allow Ceph RBD pool params to be tuned

This PS exposes the Ceph RBD pool params to the cinder chart, allowing
them to be tuned.

Change-Id: I615e999928948193b24cc4978efb31bd1b36f8f7

Armada check: Enable storage for OSH-infra services

This enables storage for the osh-infra services running in the
armada job

Change-Id: Ic0f11a9d161529c6fb58474e856032745b07a032

remove trailing ws

Change-Id: Ida8e4a5d072f8dff635dfffd4336d697ab1d4753

Add ldap support

This patch set adds python ldap support to keystone.

Change-Id: I420612555d92f6fb932f2f210cc36f3f7f5afc97
Signed-off-by: Tin Lam <email address hidden>

Reduce the number of workers spawned by services

This PS reduces the number of processes spawned by services, as
with Kubernetes load distribution can be better managed by a larger
number of single threaded pods (up to a certain point) and doing so
also provides both increased avilibility, leading to smoother rolling
updates. In addtion when running single replicas resource consuption
is reduced.

Change-Id: Ifb7494a0804913d843a072e10d26c6ec53c3bd16

DB-Drop-Jobs: consolidate to helm-toolkit

This PS consolidates the DB-Drop Job to helm-toolkit.

Change-Id: Ia2b035d730bf612086a9fd9b5d14aba494f56dc7

Add trustee domain

This patch set allows for searching the trustee user in a specified
domain rather than just the "default" domain.

Change-Id: I53ee6816e02c25e577244015fe5aea0870e0fd32
Signed-off-by: Tin Lam <email address hidden>

Add Makefile

This patchset adds a Makefile for each component under tools/images

Change-Id: I84d8bda0313e921f0921dfef10d14469ed26ff5c

Ingress controller service: consolidate to helm-toolkit

This PS consolidates the Ingress controller service, that is used
to resolve internal requests to public endpoints correctly, to
helm-toolkit.

Change-Id: If7c7deca1b8289a32709f7dc7c936883469aadfe

Cinder: Fix sudoers reference in configmap

The cinder_sudoers entry in the cinder configmap-etc was consuming
the neutron_sudoers entry in the values.yaml. This corrects it to
point at cinder_sudoers instead

Change-Id: I214912b3ed4185a201f4f94e82eaa50d6d321018

Cinder: Fix default uid for cinder user with loci images

This PS corrects the UID for the cinder user used with loci images
in the cinder chart.

Change-Id: I1001711928fb47e77f01c8e83f88ec317a46498e

glance-api: add dependency on message bus

without this the api starts up in a non-working state, the bootstrap
job then runs and give is images which are stuck queued

Change-Id: Ie3e03620618b1c46882c05b3a5ef8745c78af6a3

Neutron: SR-IOV support

This PS adds SR-IOV Support to OSH.

Change-Id: Ia744c6d7c4a45be7728bba3213b50f1246b897db

Cinder: add qemu profile to cinder images

This PS adds the qemu profile to cinder images

...

Revision history for this message
Grzegorz Grasza (xek) wrote :

Closing out bugs created before migration to StoryBoard. Please re-open if you are of the opinion it is still current.

Changed in barbican:
status: New → Won't Fix
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.