chef-cookbooks icon indicating copy to clipboard operation
chef-cookbooks copied to clipboard

[horizon] Unnecessary use of chef-rewind

Open odyssey4me opened this issue 11 years ago • 3 comments

The following lines of code:

  1. https://github.com/rcbops-cookbooks/horizon/blob/master/recipes/server.rb#L30-L31
  2. 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.

odyssey4me avatar Mar 28 '14 07:03 odyssey4me

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 avatar Mar 28 '14 08:03 mancdaz

@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.

odyssey4me avatar Mar 28 '14 10:03 odyssey4me

Related: https://github.com/rcbops/chef-cookbooks/issues/885

claco avatar Mar 28 '14 13:03 claco