chef-cookbooks
chef-cookbooks copied to clipboard
[horizon] Unnecessary use of chef-rewind
The following lines of code:
- https://github.com/rcbops-cookbooks/horizon/blob/master/recipes/server.rb#L30-L31
- https://github.com/rcbops-cookbooks/horizon/blob/master/recipes/server.rb#L58-L72
Can be replaced with simply doing something like https://github.com/rcbops-cookbooks/horizon/blob/master/recipes/server.rb#L58-L60 before line https://github.com/rcbops-cookbooks/horizon/blob/master/recipes/server.rb#L51.
This simplifies the recipe and combats the unnecessary reloads of Apache on every chef run.
Hi @odyssey4me
Yeah looks like we were doing the rewinds and dropping our own ports.conf template because, prior to this https://github.com/opscode-cookbooks/apache2/commit/08a20f200a30f046e50074650a6e6d0a45dd9460#diff-9a0bc5b0a917e87d68786a798af7e57b there was no way in the apache2 cookbook ports.conf template to actually specify listen IP (only ports), which we needed for haproxy/keepelived stack.
Though it shouldn't be restarting apache on every run, only when ports.conf changes.
@mancdaz I've been doing quite a bit of work with the old Folsom-level cookbooks as part of a staged update process for two of our sites (Essex->Folsom->Grizzly), which is where the Apache constantly reloads. As I recall that issue was sorted out in the Grizzly-level cookbooks, which is why it's not happening any more. Working through this again just made me think that there are more elegant ways now of achieving the goal than having to use chef-rewind.
Related: https://github.com/rcbops/chef-cookbooks/issues/885