From 80f4a1ce4edb1638482e2391dabd1ba547ed7fad Mon Sep 17 00:00:00 2001 From: John Bellone Date: Thu, 17 Mar 2016 11:06:55 -0400 Subject: [PATCH] Fix #288 - No longer restart Consul automatically. This seems to have come up a few times in the recent past. The idea here is that we do not want to update Consul because the Chef Client may be running in parallel on all of the nodes and result in a Consul cluster downtime. This separately also sends a SIGHUP (reload) when a configuration change is made instead of restarting the agent (for the same reasons). Because of this change it means that there will no longer be seamless upgrades. It will require an operator to restart the Consul process on all of the machines. Or they're going to need to wait until the instance restarts since it'll be picked up at the next boot. --- recipes/default.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/default.rb b/recipes/default.rb index 9ca0e476..85c0f116 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -52,14 +52,13 @@ group node['consul']['service_group'] end node['consul']['config'].each_pair { |k, v| r.send(k, v) } - notifies :restart, "consul_service[#{service_name}]", :delayed + notifies :reload, "consul_service[#{service_name}]", :delayed end install = consul_installation node['consul']['version'] do |r| if node['consul']['installation'] node['consul']['installation'].each_pair { |k, v| r.send(k, v) } end - notifies :restart, "consul_service[#{service_name}]", :delayed end consul_service service_name do |r|