Skip to content

Support defining log_error in mysql::server #621

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

Closed
wants to merge 1 commit into from
Closed

Support defining log_error in mysql::server #621

wants to merge 1 commit into from

Conversation

antoineco
Copy link

On RedHat 7 the default provider has been set to mariadb. However, when one uses MySQL instead, the error log file is still enforced to MariaDB's default (/var/log/mariadb/mariadb.log) which parent folder is obviously not created by MySQL packages, and Puppet fails.

This commit allows setting the path to the error log file to avoid the failure.

@igalic
Copy link
Contributor

igalic commented Dec 11, 2014

i feel like we should fix the root cause of that.

@antoineco
Copy link
Author

Indeed, it would be even cleaner to be able to enforce the provider value here:
https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/params.pp#L41-47

@igalic
Copy link
Contributor

igalic commented Dec 22, 2014

nod

any idea how to propagate that?

@antoineco
Copy link
Author

Well I could think of a dirty solution:

  • add a provider parameter to init.pp (and appropriate subclasses)
  • remove inheritance on params.pp in init.pp
  • include params.pp from within init.pp, and clone all the resulting parameters (eg. $_package_name = $mysql::params::package_name)

This involves setting a default value of undef to all parameters in init.pp and assign the actual default values later in the class via clone parameters, or the user defined value if not equal to undef.

It's kind of messy but I use this pattern a lot in my tomcat module.

Should I submit a pull request or is it a no go?

@igalic
Copy link
Contributor

igalic commented Jan 28, 2015

from what i gather, you're hinting at a ::globals pattern, like we use in postgresql

@antoineco
Copy link
Author

Yes sir, I didn't know there was a name for it. Thanks for the reference

@timmooney
Copy link
Contributor

I like where @TONI0 is going with this and we need a fix for this too for RHEL 6 with the MariaDB from the Red Hat Software Collections Library (SCL).

My problem with this approach is that it's different from the one that mysql::server::install uses to find the datadir and basedir settings. It would be nice if we could come up with a consistent mechanism for overriding these configuration bits.

@underscorgan
Copy link
Contributor

@TONI0 thanks for the contribution, we resolved this with #678. Hope that helps!

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.

4 participants