Closed gboutry closed 1 year ago
Building the ROCK now will get mysqlrouter MySQL Router Ver 8.0.33 for Linux on x86_64 (MySQL Community - GPL)
and solves the issue
Building the Rock necessitates:
diff --git a/rockcraft.yaml b/rockcraft.yaml
index cd91fb7..e822fc7 100644
--- a/rockcraft.yaml
+++ b/rockcraft.yaml
@@ -8,15 +8,12 @@ description: |
mysql-client. For more information on ROCKs, visit
the https://github.com/canonical/rockcraft.
license: Apache-2.0 # your application's SPDX license
-cmd:
- - /usr/bin/setpriv
- - --clear-groups
- - --reuid
- - mysql
- - --regid
- - mysql
- - --
- - ./run
+
+services:
+ mysqlrouter:
+ override: replace
+ command: /usr/bin/setpriv --clear-groups --reuid mysql --regid mysql -- ./run
+
platforms: # The platforms this ROCK should be built on and run on
amd64:
Happy to propose a patch
Should be fixed by #51 (specifically switching from https://github.com/canonical/mysql-router-container to https://github.com/canonical/charmed-mysql-rock). Leaving open for @shayancanonical to confirm as fixed as part of DPE-1662
Tested the latest build of mysql-router-k8s (which has v8.0.32, as the server in mysql-k8s
charm is also v8.0.32) with our test application, and can confirm that this has been fixed. @gboutry please let us know if you face any further issues
Steps to reproduce
The current keystone-k8s cannot work with mysql-router (because of interface library version). I can put up a branch with the updated keystone-k8s I use is that required
Actual behavior
The behavior I'm encoutering is the same as this one: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/2003835
Versions
Operating system: not sure that's relevant Channel: 8.0/edge
Log output
Full log
Logs from my client ```shell (keystone): 2023-04-18 17:17:24,582 CRITICAL Unhandled error Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 3250, in _wrap_pool_connect return fn() File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 310, in connect return _ConnectionFairy._checkout(self) File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 868, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 476, in checkout rec = pool._do_get() File "/usr/lib/python3/dist-packages/sqlalchemy/pool/impl.py", line 146, in _do_get self._dec_overflow() File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ compat.raise_( File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception File "/usr/lib/python3/dist-packages/sqlalchemy/pool/impl.py", line 143, in _do_get return self._create_connection() File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 256, in _create_connection return _ConnectionRecord(self) File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 371, in __init__ self.__connect() File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 666, in __connect pool.logger.debug("Error on connect(): %s", e) File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ compat.raise_( File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 661, in __connect self.dbapi_connection = connection = pool._invoke_creator(self) File "/usr/lib/python3/dist-packages/sqlalchemy/engine/create.py", line 590, in connect return dialect.connect(*cargs, **cparams) File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 597, in connect return self.dbapi.connect(*cargs, **cparams) File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 353, in __init__ self.connect() File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 633, in connect self._request_authentication() File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 932, in _request_authentication auth_packet = _auth.caching_sha2_password_auth(self, auth_packet) File "/usr/lib/python3/dist-packages/pymysql/_auth.py", line 257, in caching_sha2_password_auth raise OperationalError( pymysql.err.OperationalError: caching sha2: Unknown packet for public key: b'-' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/bin/keystone-manage", line 10, inAdditional context
When attaching the following image:
mysql/mysql-router:8.0.31-1.0.10-router
, everything works as expected.