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

Update logic for rsyslog_config #86

Merged
merged 1 commit into from
Nov 17, 2015

Conversation

anders-larsson
Copy link
Contributor

rsyslog_config is now only managed if fact rsyslog_version is set. If
rsyslog_config is managed while $::rsyslog_version is unavailable an
incompatible configuration file might be installed and prevent rsyslog
from logging until next Puppet run when $::rsyslog_version is present.


If a different syslog daemon than rsyslog is used on a system running this module there's a good change that rsyslog won't log anything at until the next Puppet run. The fact rsyslog_version isn't populated with any version string in the beginning of the Puppet run because rsyslog is not yet installed. Because of this there's a big chance the configuration file installed won't work with the rsyslog version installed on the system because it falls back to the earliest version available which is 2.

We've seen this on SLE11.1 systems but I'm sure it happens on other operating systems as well.
Proposed solution is to only manage rsyslog_config if rsyslog_version has a value. This will prevent Puppet from installing a configuration file that does not work with the current system's rsyslog version.

rsyslog_config is now only managed if fact rsyslog_version is set. If
rsyslog_config is managed while $::rsyslog_version is unavailable an
incompatible configuration file might be installed and prevent rsyslog
from logging until next Puppet run when $::rsyslog_version is present.
@anders-larsson
Copy link
Contributor Author

Any updates?

@Phil-Friderici
Copy link
Contributor

@ghoneycutt I like this idea.
It solves the problem that you have in the case of initial installation of Rsyslog. At that time $::rsyslog_version will be empty and so the module will roll out a broken configuration avoiding the clients to log something.

This solution will skip the configuration file handling if $::rsyslog_version is empty. In these cases the OS vendor default will be used until the next puppet run.

👍

@ghoneycutt
Copy link
Owner

Looks good to me. This way we use the conf file with the package on first run.

ghoneycutt added a commit that referenced this pull request Nov 17, 2015
@ghoneycutt ghoneycutt merged commit 7763478 into ghoneycutt:master Nov 17, 2015
@ghoneycutt
Copy link
Owner

Released in v0.20.1

@ghoneycutt
Copy link
Owner

Thank you @anders-larsson and @Phil-Friderici

@anders-larsson anders-larsson deleted the rsyslog_config_logic branch November 17, 2015 15:40
@Phil-Friderici
Copy link
Contributor

Thank you gentlemen :)

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

Successfully merging this pull request may close these issues.

3 participants