[chef] Re: Re: Re: pre-update notifications


Chronological Thread 
  • From: Andrew Gross < >
  • To: chef < >
  • Subject: [chef] Re: Re: Re: pre-update notifications
  • Date: Thu, 22 Aug 2013 10:56:05 -0400

Fair enough, the order was rather arbitrary in my example, though I can see how it might be problematic, as you would now need an additional block to determine if an update was available, and one to install it.


On Thu, Aug 22, 2013 at 10:52 AM, Grégoire Seux < " target="_blank"> > wrote:
Le 22/08/2013 16:17, Andrew Gross a écrit :


execute "Update Cassandra" do
  notifies :run, execute[Downtime Cassandra Host],
end

execute "Downtime Cassandra Host" do
  action :nothing
  notifies :restart, service[Cassandra],
end

service "Cassandra" do
  action :nothing
end
Hi Andrew,

thanks for your reply.
This issue with your solution is that it assumes that you can update the package and then decide to restart the service.
In my case, the package contains triggers to update restart the service (stop it as pre-install and start as post-install hook). This pattern is quite commom I guess on rhel and debian systems.

So in your example you would have updated the package (thus restart the service), downtimed the host and restart the service once more.

--
Gregoire




Archive powered by MHonArc 2.6.16.

§