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

Why was this role included in common.yml? #12

Open
accelas opened this issue Dec 2, 2016 · 1 comment
Open

Why was this role included in common.yml? #12

accelas opened this issue Dec 2, 2016 · 1 comment

Comments

@accelas
Copy link

accelas commented Dec 2, 2016

Given both debian and ubuntu are now running with journald by default. It seems after running common.yml, journald and rsyslog are running side-by-side.

@drybjed
Copy link
Member

drybjed commented Dec 3, 2016

Good question! The rsyslog service is installed by default on Debian Wheezy, Jessie, Ubuntu systems as well. I wasn't able to test this on Debian Stretch at the moment.

The rsyslog in Jessie was installed by default to provide persistent, cleartext logs. The journald logs are not persistent by default and it has/had issues where the persistent logs in /var/log/journal/ directory could get corrupted and break the logging altogether. Cleartext logs allowed easier transition from older systems to Jessie which shipped with systemd for the first time.

The journald in Debian Jessie doesn't support remote logging. The rsyslog service can be used as a replacement to forward logs to a different system. However, it looks like in Stretch, systemd-journal-remote will be available so it can take over. It is available in jessie-backports as well, but that requires upgrade of the systemd package to version from jessie-backports.

So, why is debops.rsyslog by default in the common.yml playbook? It was there from the very beginning. The initial role didn't do much, just redirected cron messages to a separate file so that they wouldn't spam /var/log/auth.log. This was the status quo for a long time, until the role was revisited and expanted to manage rsyslog service properly. The reason for staying in the common.yml playbook is that this way the syslog configuration can be sorted out early on and logs could be redirected to different files or hosts almost from the start.

I suppose that with systemd-journal-remote coming up the debops.rsyslog role could be removed from the common.yml playbook. It can still be enabled farily easily via an Ansible inventory group if someone needs it. The rsyslog service still will be installed by default by Debian Installer though. Right now there's no good way to automatically purge it by DebOps after journald is configured, but a role for that could be written, say debops.apt_purge which would purge unwanted packages early on.

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

2 participants