-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Allow to configure consul_service behavior through attributes #316
Allow to configure consul_service behavior through attributes #316
Conversation
4d17826
to
c4f0708
Compare
I want to rope in @coderanger to this discussion (as well as #314). We have a lot of cookbooks that follow the pattern of implementing PoiseService::ServiceMixin as a custom resource, what's the best way to override service options like @kamaradclimber given that we set some defaults in #service_options? |
Just for my thoughts: I've been actually leaning a way from having a separate resource for service instances and instead using poise_service directly where possible. The only caveat here is Windows, and I think that we can create a poise-service provider for nssm to be done with it once and for all. |
After reading the documentation it seems that we should be able to do this from a wrapper cookbook/policy: default['poise-service']['consul']['options']['systemd']['template'] = 'consul-wrapper:systemd.erb' But we should wait for the man to speak (@coderanger). |
@johnbellone any news regarding this MR ? Should I rebase and fix the conflicts or do you have another solution ? |
Were you able to test the above? I can do so today at some point. |
thanks for your answer. |
Would you be able to rebase? |
c4f0708
to
a3c8689
Compare
done |
Current coverage is 59.84%
|
# @!attribute restart_on_update | ||
# Whether to restart the service on updates | ||
# @return [Boolean] | ||
attribute(:restart_on_update, kind_of: [TrueClass, FalseClass], default: lazy { node['consul']['service']['restart_on_update'] }) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
We keep the current behavior: - do not restart on linux - restart on windows
a3c8689
to
e4e4949
Compare
@johnbellone would you have feedback regarding this PR? |
We have custom init/systemd scripts for all our Hashicorp related cookbooks, & this is how we override them: # our_wrapper_cookbook/recipes/default.rb
node.override['poise-service']['consul']['template'] = 'our_wrapper_cookbook:file.erb' |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fix #314