New users sometimes not created for shared-db peers

Bug #1906714 reported by Paul Goins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Percona Cluster Charm
New
Undecided
Unassigned

Bug Description

This is possibly, but not necessarily, related to https://bugs.launchpad.net/charm-percona-cluster/+bug/1906711. The issue did occur at the same time.

I had an issue where a gnocchi unit related to percona-cluster was not able to log in. Upon closer inspection, I saw that while the password had been shared via the relation data, no user record was present in MySQL itself to allow the login from the new unit.

Workaround: I had to manually create the user record in MySQL to allow the logins to work:

  create user '<app name>'@'<app unit ip>' identified by password '<hash copied from user record of peer>'

Revision history for this message
Paul Goins (vultaire) wrote :

Actually, the above was not adequate. The above created the missing user, but there's also grants necessary.

Revision history for this message
Paul Goins (vultaire) wrote :

Additionally needed:

GRANT ALL PRIVILEGES ON `{db_name}`.* TO '{db_user}'@'{remote_ip}' IDENTIFIED BY '{password}'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.