Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logrotate false param ignored #16

Open
jgarber623 opened this issue Feb 14, 2016 · 0 comments
Open

logrotate false param ignored #16

jgarber623 opened this issue Feb 14, 2016 · 0 comments

Comments

@jgarber623
Copy link

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_if on 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant