# dpkg -l | grep percona-xtradb-cluster-server
ii percona-xtradb-cluster-server 5.7.20-29.24-0ubuntu2.1 all Percona XtraDB Cluster database server
ii percona-xtradb-cluster-server-5.7 5.7.20-29.24-0ubuntu2.1 amd64 Percona XtraDB Cluster database server binaries
# lsb_release -c
Codename: bionic
2019-10-22 15:31:15 DEBUG juju-log shared-db:53: All 3 percona units reporting clustered
2019-10-22 15:31:15 DEBUG juju-log shared-db:53: Opening db connection for root@localhost
2019-10-22 15:31:16 DEBUG juju-log shared-db:53: Opening db connection for root@localhost
2019-10-22 15:31:16 DEBUG shared-db-relation-changed active
2019-10-22 15:31:16 INFO juju-log shared-db:53: Unit is ready
2019-10-22 15:31:17 DEBUG shared-db-relation-changed /var/lib/juju/agents/unit-mysql-1/charm/charmhelpers/contrib/database/mysql.py:130: Warning: (1287, 'Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.')
2019-10-22 15:31:17 DEBUG shared-db-relation-changed password))
2019-10-22 15:31:43 DEBUG juju-log shared-db:104: Single hostname provided by relation: 172.17.104.44
2019-10-22 15:31:43 DEBUG juju-log shared-db:104: Opening db connection for root@localhost
2019-10-22 15:31:47 DEBUG shared-db-relation-changed Traceback (most recent call last):
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-mysql-1/charm/hooks/shared-db-relation-changed", line 1132, in <module>
2019-10-22 15:31:48 DEBUG shared-db-relation-changed main()
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-mysql-1/charm/hooks/shared-db-relation-changed", line 1122, in main
2019-10-22 15:31:48 DEBUG shared-db-relation-changed hooks.execute(sys.argv)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-mysql-1/charm/charmhelpers/core/hookenv.py", line 914, in execute
2019-10-22 15:31:48 DEBUG shared-db-relation-changed self._hooks[hook_name]()
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-mysql-1/charm/hooks/shared-db-relation-changed", line 897, in shared_db_changed
2019-10-22 15:31:48 DEBUG shared-db-relation-changed db_helper)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-mysql-1/charm/hooks/shared-db-relation-changed", line 789, in configure_db_for_hosts
2019-10-22 15:31:48 DEBUG shared-db-relation-changed password = db_helper.configure_db(host, database, username)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-mysql-1/charm/charmhelpers/contrib/database/mysql.py", line 456, in configure_db
2019-10-22 15:31:48 DEBUG shared-db-relation-changed self.create_grant(database, username, remote_ip, password)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-mysql-1/charm/charmhelpers/contrib/database/mysql.py", line 130, in create_grant
2019-10-22 15:31:48 DEBUG shared-db-relation-changed password))
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 250, in execute
2019-10-22 15:31:48 DEBUG shared-db-relation-changed self.errorhandler(self, exc, value)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
2019-10-22 15:31:48 DEBUG shared-db-relation-changed raise errorvalue
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 247, in execute
2019-10-22 15:31:48 DEBUG shared-db-relation-changed res = self._query(query)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 411, in _query
2019-10-22 15:31:48 DEBUG shared-db-relation-changed rowcount = self._do_query(q)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 374, in _do_query
2019-10-22 15:31:48 DEBUG shared-db-relation-changed db.query(q)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 292, in query
2019-10-22 15:31:48 DEBUG shared-db-relation-changed _mysql.connection.query(self, query)
2019-10-22 15:31:48 DEBUG shared-db-relation-changed _mysql_exceptions.OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')
2019-10-22 15:31:48 ERROR juju.worker.uniter.operation runhook.go:132 hook "shared-db-relation-changed" failed: exit status 1
Hit it on percona itself this time.
# dpkg -l | grep percona- xtradb- cluster- server xtradb- cluster- server 5.7.20- 29.24-0ubuntu2. 1 all Percona XtraDB Cluster database server xtradb- cluster- server- 5.7 5.7.20- 29.24-0ubuntu2. 1 amd64 Percona XtraDB Cluster database server binaries
ii percona-
ii percona-
# lsb_release -c
Codename: bionic
2019-10-22 15:31:15 DEBUG juju-log shared-db:53: All 3 percona units reporting clustered db-relation- changed active db-relation- changed /var/lib/ juju/agents/ unit-mysql- 1/charm/ charmhelpers/ contrib/ database/ mysql.py: 130: Warning: (1287, 'Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.') db-relation- changed password)) db-relation- changed Traceback (most recent call last): db-relation- changed File "/var/lib/ juju/agents/ unit-mysql- 1/charm/ hooks/shared- db-relation- changed" , line 1132, in <module> db-relation- changed main() db-relation- changed File "/var/lib/ juju/agents/ unit-mysql- 1/charm/ hooks/shared- db-relation- changed" , line 1122, in main db-relation- changed hooks.execute( sys.argv) db-relation- changed File "/var/lib/ juju/agents/ unit-mysql- 1/charm/ charmhelpers/ core/hookenv. py", line 914, in execute db-relation- changed self._hooks[ hook_name] () db-relation- changed File "/var/lib/ juju/agents/ unit-mysql- 1/charm/ hooks/shared- db-relation- changed" , line 897, in shared_db_changed db-relation- changed db_helper) db-relation- changed File "/var/lib/ juju/agents/ unit-mysql- 1/charm/ hooks/shared- db-relation- changed" , line 789, in configure_ db_for_ hosts db-relation- changed password = db_helper. configure_ db(host, database, username) db-relation- changed File "/var/lib/ juju/agents/ unit-mysql- 1/charm/ charmhelpers/ contrib/ database/ mysql.py" , line 456, in configure_db db-relation- changed self.create_ grant(database, username, remote_ip, password) db-relation- changed File "/var/lib/ juju/agents/ unit-mysql- 1/charm/ charmhelpers/ contrib/ database/ mysql.py" , line 130, in create_grant db-relation- changed password)) db-relation- changed File "/usr/lib/ python3/ dist-packages/ MySQLdb/ cursors. py", line 250, in execute db-relation- changed self.errorhandl er(self, exc, value) db-relation- changed File "/usr/lib/ python3/ dist-packages/ MySQLdb/ connections. py", line 50, in defaulterrorhandler db-relation- changed raise errorvalue db-relation- changed File "/usr/lib/ python3/ dist-packages/ MySQLdb/ cursors. py", line 247, in execute db-relation- changed res = self._query(query) db-relation- changed File "/usr/lib/ python3/ dist-packages/ MySQLdb/ cursors. py", line 411, in _query db-relation- changed rowcount = self._do_query(q) db-relation- changed File "/usr/lib/ python3/ dist-packages/ MySQLdb/ cursors. py", line 374, in _do_query db-relation- changed db.query(q) db-relation- changed File "/usr/lib/ python3/ dist-packages/ MySQLdb/ connections. py", line 292, in query db-relation- changed _mysql. connection. query(self, query) db-relation- changed _mysql_ exceptions. OperationalErro r: (1213, 'Deadlock found when trying to get lock; try restarting transaction') uniter. operation runhook.go:132 hook "shared- db-relation- changed" failed: exit status 1
2019-10-22 15:31:15 DEBUG juju-log shared-db:53: Opening db connection for root@localhost
2019-10-22 15:31:16 DEBUG juju-log shared-db:53: Opening db connection for root@localhost
2019-10-22 15:31:16 DEBUG shared-
2019-10-22 15:31:16 INFO juju-log shared-db:53: Unit is ready
2019-10-22 15:31:17 DEBUG shared-
2019-10-22 15:31:17 DEBUG shared-
2019-10-22 15:31:43 DEBUG juju-log shared-db:104: Single hostname provided by relation: 172.17.104.44
2019-10-22 15:31:43 DEBUG juju-log shared-db:104: Opening db connection for root@localhost
2019-10-22 15:31:47 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 DEBUG shared-
2019-10-22 15:31:48 ERROR juju.worker.