-
Notifications
You must be signed in to change notification settings - Fork 794
more flexible service require #636
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
…t-warning Fix lint warning in server/service.pp
require => [ File['mysql-config-file'], Package['mysql-server'] ] | ||
# if you manage the config file outside of the module or want mysql provided by another package, you may still use this service | ||
# provided you set the parameters config_file resp. package_name on the mysql::server class | ||
require => [ File[$mysql::server::config_file], Package[$mysql::server::package_name]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you conditionalize the File[$mysql::server::config_file]
dependency on $mysql::server::manage_config_file
(see #630 for example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hunner:
Why should we? Pls see the discussion on this at #630? In the proposed form it works well with a externally manged config files. I think this is the better alternative because MySQL still requires a config file to start.
This form of the require ensures that the config exists, when the server starts but even allows not standard locations of the file.
Because of this, this PR is an alternative to #630.
…-mysql into service-require Conflicts: manifests/server/service.pp
@mhaskel I did the rebase and pushed the results. Who is responsible to remove the "needs-rebase" label? |
@Micsi I think something went wrong with your rebase ... there aren't any commits there from you anymore and the PR is showing no changes |
It looks like the rebase went wonky? There are now no lines changed. Try this: git checkout service-require
git reset --hard 6c48b1c
git checkout master
git remote add puppetlabs https://github.com/puppetlabs/puppetlabs-mysql.git
git remote update
git reset --hard puppetlabs/master
git checkout service-require
git rebase master < fix your merge conflict here, then git rebase --continue
git push -f origin service-require And that should get this PR up to date with only one commit, no merge conflicts, and the changes you want. |
Actually, it looks like this PR won't actually fix the same usecase as #630. If $manage_config_file is set to false this will be adding dependencies on resources that likely don't exist. |
@mhaskel what added dependencies do you think of? I for example want to copy an existing config file over to the server and use the module service. To require the config to exist before starting the machine is correct. I think the management of the config file has nothing to do with the service. My version covers most use cases for configs. |
@Micsi We think something more along the lines of #630 is better, just not adding that dependency if the config file isn't being managed. If the config file is being managed externally, there should probably be a |
ok then. I'll do as you say ;-) |
@Micsi any updates here? |
sorry, not yet. Will push requested changes asap. |
thank you everyone! this was fixed in #672 |
This makes the recently merged service-require PR #615 work better with externally managed config-files, even stored in unusual places as well as with user-specified packages. See discussion with original author at PR #615.
Works well with package-manage param PR #617
This is sort of an alternative to PR #630