Skip to content

Commit

Permalink
Restart consul service on configuration change
Browse files Browse the repository at this point in the history
Reloading Consul has no effect when changing agent configuration

Only checks and services definitions are reloadable
  • Loading branch information
jubianchi committed Jul 29, 2014
1 parent 3548309 commit 8fdfe2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recipes/_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@
service 'consul' do
supports status: true, restart: true, reload: true
action [:enable, :start]
subscribes :reload, "file[#{node[:consul][:config_dir]}/default.json]", :delayed
subscribes :restart, "file[#{node[:consul][:config_dir]}/default.json]", :delayed
end
when 'runit'
include_recipe 'runit'

runit_service 'consul' do
supports status: true, restart: true, reload: true
action [:enable, :start]
subscribes :reload, "file[#{node[:consul][:config_dir]}/default.json]", :immediately
subscribes :restart, "file[#{node[:consul][:config_dir]}/default.json]", :immediately
log true
options(
consul_binary: "#{node[:consul][:install_dir]}/consul",
Expand Down

0 comments on commit 8fdfe2e

Please sign in to comment.