From 8fdfe2ed605e6ec18d54d2d462aa68838fbf9ed5 Mon Sep 17 00:00:00 2001 From: jubianchi Date: Tue, 29 Jul 2014 16:10:53 +0200 Subject: [PATCH] Restart consul service on configuration change Reloading Consul has no effect when changing agent configuration Only checks and services definitions are reloadable --- recipes/_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/_service.rb b/recipes/_service.rb index d169b6de..bc933646 100644 --- a/recipes/_service.rb +++ b/recipes/_service.rb @@ -113,7 +113,7 @@ 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' @@ -121,7 +121,7 @@ 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",