- From: Ash Berlin <
>
- To:
- Subject: [chef] Dependancy order problem
- Date: Tue, 28 Dec 2010 16:48:23 +0000
Chefs,
So I just got bit by a problem (on my staging server luckily) where after
rebooting a host the Chef tried to restart the nginx server before writing
out the new config. But it wouldn't start since it has an error in the
config, so stopped before it wrote out the corrected config...
The service definition was
service "nginx" do
supports :status => true, :restart => true, :reload => true
action [ :enable, :start ]
end
Then later on I (would have) writen /etc/nginx/sites-enabled/myapp.com via a
template:
nginx_site proxy_type do
source "proxies/#{proxy_type}.erb"
variables cfg
end
nginx_site has a
notifies :reload, resources(:service => "nginx")
in it.
Thoughts? How do i fix this kind of problem without manually going in and
fixing the config?
Cheers,
-ash
- [chef] Dependancy order problem, Ash Berlin, 12/28/2010
Archive powered by MHonArc 2.6.16.