evertrue / zookeeper-cookbook

Chef cookbook for installing and managing Zookeeper.
https://supermarket.chef.io/cookbooks/zookeeper
Apache License 2.0
81 stars 119 forks source link

zookeeper_config doesn't notify Chef if updated #109

Closed hulu1522 closed 9 years ago

hulu1522 commented 9 years ago

zookeeper_config is used to create the configuration file for Zookeeper. As with many config files it is necessary to restart the service if this file changes. The current LWRP fails to let Chef know so there is no notifications happened when updated.

I have a PR coming that will fix it so the following resource now works:

zookeeper_config "#{node[:zookeeper][:install_dir]}/zookeeper-#{node[:zookeeper][:version]}/conf/zoo.cfg" do
  config node[:zookeeper][:config]
  user   node[:zookeeper][:user]
  action :render
  notifies :restart, "runit_service[zookeeper]", :delayed
end
hulu1522 commented 9 years ago

Resolved with commit dcb41b95d22023010c1169db0e09489976fd131f