- From: Jesse Campbell <
>
- To:
- Subject: [chef] Re: Templates sends notification even when nothing changes
- Date: Tue, 21 Feb 2012 10:41:44 -0500
- Authentication-results: mr.google.com; spf=pass (google.com: domain of
designates 10.180.95.1 as permitted sender)
; dkim=pass
What version of chef client are you running?
On Tue, Feb 21, 2012 at 10:33, Arthur Kalmenson
<
>
wrote:
>
Hello everyone,
>
>
I have a template resource that notifies the service to restart. It looks as
>
follows:
>
>
# apply configurations
>
template "#{install_dir}/package.json" do
>
source "package.json.erb"
>
owner hubot_user
>
group hubot_group
>
mode "0644"
>
notifies :restart, "service[hubot]"
>
end
>
>
template "#{install_dir}/hubot-scripts.json" do
>
source "hubot-scripts.json.erb"
>
owner hubot_user
>
group hubot_group
>
mode "0644"
>
notifies :restart, "service[hubot]"
>
end
>
>
It's my understanding that the notification will only get called when the
>
template renders differently. However, even when nothing has changed, every
>
time chef-client runs, the restart happens.
>
>
...
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Processing
>
template[/etc/init.d/hubot] action create (hubot::default line 93)
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Processing service[hubot] action
>
enable (hubot::default line 100)
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Processing service[hubot] action
>
start (hubot::default line 100)
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Processing package[redis-server]
>
action install (redis::package line 21)
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Processing service[redis] action
>
start (redis::package line 23)
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Processing
>
template[/etc/redis/redis.conf] action create (redis::package line 30)
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO:
>
template[/usr/local/hubot/package.json] sending restart action to
>
service[hubot] (delayed)
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Processing service[hubot] action
>
restart (hubot::default line 100)
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: service[hubot] restarted
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Chef Run complete in 2.929228
>
seconds
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Running report handlers
>
[Tue, 21 Feb 2012 10:25:53 -0500] INFO: Report handlers complete
>
>
Does anyone know why this is happening? Thank you in advance.
>
>
All the best,
>
--
>
Arthur Kalmenson
>
Archive powered by MHonArc 2.6.16.