CentOS 7.6 rsyslogd 8.24.0-34 bug causing not processing imfile logs after logrotate
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Issue:
I have deployed CentOS 7.6 with stein and found none of component sending logs to remote syslog, and after investigation found logrotate causing
Step to reproduce issue:
1. systemctl stop rsyslog
2. rm -rf /var/spool/
3. systemctl start rsyslog
4. lets wait for logrotate
5. after logrotate syslog stop forwarding logs to remote syslog host.
Impacted version of rsyslog:
rsyslogd 8.24.0-34.el7
Solution:
Upgrade rsyslog with following process:
cd /etc/yum.repos.d/
wget http://
yum upgrade rsyslog
Notes: you have to stop rsyslog and remove all file in /var/spool/
I would suggest we should push newer version of rsyslog in openstack-ansible package so people like me don't waste 2 week to troubleshoot this issue, or make documentation clear.
Incase if folks already deployed cloud and want to upgrade rsyslog with latest version then here is the playbook.
$cat rsyslog-upgrade.yml
--- host_group| default( 'hosts' ) }}" host_group | default('hosts') }}:all_containers" repos.d/ rsyslog. repo
- hosts: "{{ openstack_
- hosts: "{{ openstack_
tasks:
- name: Install rsyslog-v8 yum repo
template:
src: files/rsyslog.repo
dest: /etc/yum.
- name: Install rsyslog-v8 package
yum:
name: rsyslog
state: latest
- name: Stop rsyslog
systemd:
name: rsyslog
state: stopped
- name: cleann up /var/spool/rsyslog rsyslog/ *
shell: /bin/rm -rf /var/spool/
- name: Start rsyslog
systemd:
name: rsyslog
state: started
Run playbook:
openstack-ansible rsyslog-upgrade.yml --limit <group_name>