Skip to content

Change grant provider to ignore grants for non existing users. #530

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

Conversation

spil-jaak
Copy link
Contributor

In the grant provider users are fetched by querying mysql.user table. Grants
for those users are fetched using show grants for... syntax. This can lead to
errors, when some of the users in mysql.user table do not have currently
active grants.

This happens at least when MySQL is started with --skip-name-resolve option,
and there are users with the hostname part specified as a FQDN. Such users are
created by mysql_install_db. This leads to problems if mysql::account_security
is included for the node and skip-name-resolve is specified in override_options
hash for mysql::server.

@igalic
Copy link
Contributor

igalic commented Jun 11, 2014

@spil-jaak do you think you can come up with a acceptance test for this?

@spil-jaak
Copy link
Contributor Author

I can. It'll take me some time though. I'll get back to you, when done.

In the grant provider users are fetched by querying mysql.user table. Grants
for those users are fetched using show grants for... syntax. This can lead to
errors, when some of the users in mysql.user table do not have currently
active grants.

This happens at least when MySQL is started with --skip-name-resolve option,
when there are users with the hostname part specified as a FQDN. Such users are
created by mysql_install_db. This leads to problems if mysql::account_security
is included for the node and skip-name-resolve is specified in override_options
hash for mysql::server.

Includes acceptance test for the change.
@spil-jaak
Copy link
Contributor Author

Acceptance test added for the change. Also did rebase and squash.

igalic added a commit that referenced this pull request Jun 17, 2014
…nts_when_granting

Change grant provider to ignore grants for non existing users.
@igalic igalic merged commit f6e427c into puppetlabs:master Jun 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants