canonical / mysql-k8s-operator

A Charmed Operator for running MySQL on Kubernetes
https://charmhub.io/mysql-k8s
Apache License 2.0
8 stars 16 forks source link

DPE-4643 ensure username uniqueness #439

Closed paulomach closed 4 months ago

paulomach commented 5 months ago

Issue

Current username creation can lead to username collisions on cmr, due to it relying on relation id, that's only unique within a model.

Solution

Assemble the username with the model uuid and relation id, trimming to mysql's 32 char limit.

carlcsaposs-canonical commented 4 months ago

https://github.com/canonical/mysql-router-operator/pull/151#issuecomment-2208630237