rcbops / chef-cookbooks

RCB OPS - Chef Cookbooks
Other
118 stars 102 forks source link

[rsyslog / chef-cookbook roles] server_search node attribute in rsyslog-client role doesn't use environment to narrow the search results #862

Open breu opened 10 years ago

breu commented 10 years ago

this causes the rsyslog-client default recipe to lay down a configuration that may include rsyslog servers from other environments than the current one.

role: https://github.com/rcbops/chef-cookbooks/blob/master/roles/rsyslog-client.rb#L9

code that uses the bad search parameters: https://github.com/rcbops-cookbooks/rsyslog/blob/master/recipes/client.rb#L28-L29

With 4 environments and a node with the rsyslog-server in each environment the 49-remote.conf rsyslog config file will container all of the nodes in all of the environments as log destinations.

breu commented 10 years ago

This is present in https://github.com/rcbops-cookbooks/openstack-logging/blob/master/recipes/default.rb#L58-L59 as well.

jimmymccrory commented 10 years ago

Maybe a better solution for this, since @breu noted in https://github.com/rcbops-cookbooks/openstack-logging/pull/22 that this would need a change in the upstream rsyslog cookbook, would be to override ['rsyslog']['server_search'] in each chef environment.

Both cookbooks share this attribute.