I'm using chef-solo v10.12.0 to configure an Ubuntu 12.04 VM, and I keep running into an issue where services don't restart or reload as expected when a configuration file is changed.
There are no errors in the log although it's clearly doing everything else in the recipe. As a workaround I've been manually restarting services or forcing a reload/restart each time the recipe executes, but I'd prefer to figure out what's going wrong and have it work as expected.
One example recipe that consistently fails to work as expected:
package "pgbouncer"
cookbook_file "/etc/default/pgbouncer" do
source "pgbouncer/pgbouncer"
owner "root"
group "root"
mode 0644
end
service "pgbouncer" do
supports :start => true, :stop => true, :restart => true, :reload => true, :status => true
action [:enable, :start]
end
cookbook_file "/etc/pgbouncer/userlist.txt" do
source "pgbouncer/userlist.txt"
owner "postgres"
group "postgres"
mode 0640
notifies :restart, "service[pgbouncer]"
end
template "/etc/pgbouncer/pgbouncer.ini" do
source "pgbouncer/pgbouncer.ini"
owner "postgres"
group "postgres"
mode 0640
variables :postgres_host => node[:postgres_host]
notifies :restart, "service[pgbouncer]"
end