Support reload vs restart
BIND doesn't need to restart, and causes service disturbance when restarted vs reloaded (i.e. if something breaks in a restart, you're down, however in a reload if you break, you just don't load the change but at least you're still up).
- Add (I've done this in my own branch thus far...)
action :reload do
service new_resource.service_name do
action :reload
end
end
- Address when to reload vs restart. Zone changes should be a reload. Zone additions and deletions can technically also be an rndc command, specifically
rndc reconfig, however it won't reload existing zones (you still needrndc reload. We can also be more targeted on the reload to dorndc reload <ZONE>and if this cookbook is supporting views (not sure that it is), then we'd add the view context to resulting inrndc reload <ZONE> <VIEW>. I haven't made updates for this but as referenced above, I've done number 1.
I'll make a small PR to add the reload action once my other PR is cleared... then I'll work on the rndc stuff .. likely through specific action additions. I'm not sure that we really need :restart after this work is done
I suspect you are correct that we don't really need restart at all. If you want to take a stab at removing it then please go ahead, otherwise I'll likely have time to do so over the upcoming weekend.
Oh, and we don't yet support views, but I had started to put some of the plumbing in place to do so in the future. It's one of the things I want to add; though not sure if there are many people who use the functionality.
I'm working on a branch that adds reload support to the bind_service resource but also has a bind_rndc resource to allow less impactful reloads. I just need to go through some more testing on what can be used where by default and will submit a PR to implement this.