[chef] Re: Re: Change restart/reload trigger order?


Chronological Thread 
  • From: Bryan McLellan < >
  • To:
  • Subject: [chef] Re: Re: Change restart/reload trigger order?
  • Date: Mon, 8 Oct 2012 12:26:30 -0400

On Fri, Oct 5, 2012 at 2:44 PM, Vincent Jorgensen
< >
 wrote:
> I meant to say that keepalived and haproxy are restarting out of order.
> Regardless, the problem is thus: keepalived gets a new configuration, which
> includes a new virtual ipaddress. haproxy gets the same ip address to add to
> it's frontend listening directive. But when haproxy restarts first, the ip
> address interface doesn't exist yet, so restart fails, which kills haproxy
> and all its running proxies. The first time I configure a new virtual ip, I
> have to manually restart keepalived so that haproxy can be properly
> restarted.

What's sending the notification to them to restart? You could notify
keepalived to restart and have it notify haproxy to restart.

If you every want to restart keepalived without restarting haproxy,
you could have a separate resource like this:

service "keepalived" do
  service_name  "keepalived"
  action [ :start, :enabled]
end

service "keepalived_haproxy" do
  service_name  "keepalived"
  notified :restart, "service[haproxy]"
end

Bryan



Archive powered by MHonArc 2.6.16.

§