You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this today while using chef-puma. With the following configuration, I'm observing chef-puma creating logrotate config files in /etc/logrotate.d regardless of the inclusion of logrotate false.
%w{example-one-com example-two-com}.each do |name|
root_path = "/var/www/#{name}"
current_path = "#{root_path}/current"
shared_path = "#{root_path}/shared"
puma_config name do
owner 'www-data'
group 'www-data'
directory current_path
working_dir current_path
rackup "#{current_path}/config.ru"
puma_directory shared_path
config_path "#{shared_path}/puma.config"
pidfile "#{shared_path}/pids/puma.pid"
state_path "#{shared_path}/pids/puma.state"
bind "unix://#{shared_path}/pids/puma.sock"
control_app_bind "unix://#{shared_path}/pids/pumactl.sock"
logrotate false
monit false
upstart true
end
end
I did some digging in and found this issue on logrotate where a user reports that logrotate ignores the only_if evaluation because logrotate_app is implemented as a definition instead of an LWRP. chef-puma attempts to use only_ifon line 163 in definitions/puma_config.rb.
I put together a fix for the issue here but didn't open a pull request as I was seeing some errors (specifically with foodcritic) when running the test suite with rake.
I'm not terribly familiar with cookbook development so figured I'd open this issue and get your thoughts.
Thanks!
The text was updated successfully, but these errors were encountered:
I noticed this today while using chef-puma. With the following configuration, I'm observing chef-puma creating logrotate config files in
/etc/logrotate.d
regardless of the inclusion oflogrotate false
.I did some digging in and found this issue on logrotate where a user reports that logrotate ignores the
only_if
evaluation becauselogrotate_app
is implemented as a definition instead of an LWRP. chef-puma attempts to useonly_if
on line 163 indefinitions/puma_config.rb
.I put together a fix for the issue here but didn't open a pull request as I was seeing some errors (specifically with foodcritic) when running the test suite with
rake
.I'm not terribly familiar with cookbook development so figured I'd open this issue and get your thoughts.
Thanks!
The text was updated successfully, but these errors were encountered: