With Juju Cross Model Relations using percona-cluster to relate to it's db results in an error in the https://pastebin.ubuntu.com/p/YXw97nhJxj/ hook.
The error is that the username is too long, this is caused by trying to use the remote_unit() string which will be much longer than the 16 chars allowed by the db helper library.
Example remote-unit name with CMR: remote-ec8dda69cfdb48d18e0dcbc65385a1f1
To reproduce:
- juju add-model src
- juju add-model sink
- juju deploy -m src cs:percona-cluster
- juju deploy -m sink cs:mediawiki
- watch -n5 juju status -m src # Wait for unit ready
- juju offer src.percona-cluster:db
- juju relate -m sink mediawiki:db admin/src.percona-cluster
The error can be seen using: juju debug-log -m controller
Observe the following error (full traceback can be seen here[1]:
_mysql_exceptions.OperationalError: (1470, "String 'remote-ec8dda69cfdb48d18e0dcbc65385a1f1' is too long for user name (should be no longer than 16)")
[1] https://pastebin.ubuntu.com/p/YXw97nhJxj/