Comment 1 for bug 1936210

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

A shorter piece of output which is of interest:

  File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/charm/reactive/mysql_innodb_cluster_handlers.py", line 302, in db_router_respond
    if instance.create_databases_and_users(db_router):
  File "lib/charm/openstack/mysql_innodb_cluster.py", line 1181, in create_databases_and_users
    password = self.configure_db_router(
  File "lib/charm/openstack/mysql_innodb_cluster.py", line 1318, in configure_db_router
    password = rw_helper.configure_router(host, username)
  File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/.venv/lib/python3.8/site-packages/charmhelpers/contrib/database/mysql.py", line 774, in configure_router
    self.create_router_grant(username, remote_ip, password)
  File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/.venv/lib/python3.8/site-packages/charmhelpers/contrib/database/mysql.py", line 747, in create_router_grant
    cursor.execute("GRANT CREATE USER ON *.* TO '{}'@'{}' WITH GRANT "

MySQLdb._exceptions.OperationalError: (1785, 'Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.')

So the issue appears when the charm tries to assign a permission to a user to create new users with the right to delegate this permission.