-
Notifications
You must be signed in to change notification settings - Fork 794
re-setting of privileges each puppet run after adding privileges for another database to puppet controlled user #1543
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
Comments
Fix for this is available in https://github.com/o4ier/puppetlabs-mysql/tree/o4ier-patch-2 |
@o4ier did you find out why this behaves differently on "externally" created databases? We encountered the same issue in some RHEL7->RHEL8 migrated database, while it works on others. Update: Running mysql_upgrade fixed the issue for "old" databases. |
@fetzerms The problem was that when "show grants" for a specific user produces output with more than one row, only the last row was evaluated by the module. In our use case the first row is the database managed by puppet, as we don't support automatic installations with multiple users/databases. But we cannot prevent that somebody else creates new databases and grants. I don't know how the "mysql way" of doing such things is in theory (like "a new user for each database"), but in practice it happens that one user has grants on multiple databases. Maybe the ordering of grants output in your setup was not strictly "puppet controlled first", so puppet evaluated the correct row by chance on some systems, as it was the last one. |
Hi @o4ier , |
@daylicron as the changes made in my fix are dependent on a "broken" PR, I am currently not able to integrate my changes into the current main-Codebase, which looks very different than the state it was in when I wrote my fix. But feel free to fork, add my changes, and open a PR |
Describe the Bug
Creating a new, additional database on mysqlserver (by hand) and granting puppet controlled user privileges on it causes setting of privileges on each puppet run, because the set privileges are not evaluated correctly
Expected Behavior
granting a puppet controlled user privileges on another databases should not cause endless re-setting of privileges for that user
Steps to Reproduce
Steps to reproduce the behavior:
Environment
Additional Context
I still have another issue ( #1502 ) /pr ( #1503 ) open/existing, which somehow got lost on my desk.
Can I reopen the pr and use it to fix both issues?
Or should I create a new pr for this issue, after the first one is accepted after i fixed it?
The text was updated successfully, but these errors were encountered: