Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made the granting of privileges idempotent #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Made the granting of privileges idempotent #38

wants to merge 4 commits into from

Conversation

jondade
Copy link

@jondade jondade commented Jul 5, 2012

The previous version of the cookbooks/db_mysql/definitions/db_mysql_set_privileges.rb conifgured a 'user' by granting all and revoking the super privilege. When using this with a single username / password for all user types in the mysql template the last action taken is to revoke the super priv from the user. This prevents the slave from configuring replication.

Jonathan Dade added 4 commits June 29, 2012 22:19
Changed the grants for the user role to use explicit grants rather than
using a grant all and revoke super.

This should resolve an issue when using RightScale MySQL templates and
employing a single username and password for all roles for the DB
The previous code when used in our templates caused replication to be
broken when using the same username and password for admin /
replication and the application DB users.

The issue was caused by the use of revoke which instead of setting the
appropriate privileges removed the super privilege from the user
removing the ability to set the master host. i.e not idempotent. This
is resolved by just granting the appropriate ones and therefore not
revoking required ones.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant