Skip to content

[MODULES-1333] Add explicit dependencies for mysql_database and mysql_user types #571

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

Merged
merged 1 commit into from
Oct 28, 2014

Conversation

jtopper
Copy link
Contributor

@jtopper jtopper commented Sep 16, 2014

Add an autorequire() dependency on /root/.my.cnf to the mysql_database and mysql_user types.

mysql_grant has an autorequire()'d dependency on the .my.cnf file used
by the provider to talk to the database.

I've added this to mysql_database and mysql_user too since logically
these also need the file to be in place.

I've hit this bug because of a slightly unusual edge case in our own
manifests, but I think this fix belongs upstream regardless.
@igalic
Copy link
Contributor

igalic commented Sep 22, 2014

any chance to add a test case for those edge cases of yours?

@jtopper
Copy link
Contributor Author

jtopper commented Oct 22, 2014

I can add tests here, but the edge case feels sufficiently unusual that it may well not add sufficient value to others for it to be included in the repo (and might serve to confuse instead).

We've used our own (non-open) MySQL class for a long time, and have started to use parts of the puppetlabs-mysql class alongside it. In particular we wanted to use the types and providers for managing users, grants etc, but not (for now) the whole mysql::server class. Our own class installs packages, creates /root/.my.cnf etc. Attempting to use mysql_database or mysql_user against our own mysql server classes fails because of the lack of explicit dependency between those resources and the config file.

@igalic
Copy link
Contributor

igalic commented Oct 27, 2014

nod

igalic added a commit that referenced this pull request Oct 28, 2014
[MODULES-1333] Add explicit dependencies for mysql_database and mysql_user types
@igalic igalic merged commit 40dd180 into puppetlabs:master Oct 28, 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.

4 participants