canonical / mysql-k8s-operator

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

DPE-4643 ensure username uniqueness #439

Closed paulomach closed 5 days ago

paulomach commented 2 weeks 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 6 days ago

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