Modified the way fluentd configures rsyslog
Fluentd makes rsyslog to send the logs to fluentd locally. This configuration was create within the puppet-tripleo, mounting the /etc/rsyslog.d/ directory on the fluentd container. This generates an issue when is deployed on RHEL BZ #1701726. This patch aim to fix it. - The /etc/rsyslog.d directory is no longer mounted on the fluentd container. - The rsyslog configuration was moved to the host_prep_tasks. Depends-On: I388180dc991926ff30f8bbc556f61447152f8dc9 Change-Id: Iae610832c12d63bde1eb507ba4bb89f2e3cfa24b
This commit is contained in:
parent
209c2919f6
commit
bbbca8d65d
|
@ -127,10 +127,35 @@ outputs:
|
|||
- /var/lib/config-data/puppet-generated/fluentd/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers:/var/log/containers:ro
|
||||
- /var/log/containers/fluentd:/var/log/fluentd:rw,z
|
||||
- /etc/rsyslog.d:/etc/rsyslog.d:rw
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks:
|
||||
- name: Check if rsyslog exists
|
||||
shell: systemctl is-active rsyslog
|
||||
register: rsyslog_config
|
||||
- when:
|
||||
- rsyslog_config is changed
|
||||
- rsyslog_config.rc == 0
|
||||
block:
|
||||
- name: Create rsyslog.d/fluentd
|
||||
blockinfile:
|
||||
content: |
|
||||
*.* @127.0.0.1:42185
|
||||
create: yes
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
path: /etc/rsyslog.d/fluentd.conf
|
||||
seuser: system_u
|
||||
serole: object_r
|
||||
setype: syslog_conf_t
|
||||
selevel: s0
|
||||
register: logconfig
|
||||
- name: restart rsyslog service after logging conf change
|
||||
service:
|
||||
name: rsyslog
|
||||
state: restarted
|
||||
when: logconfig is changed
|
||||
- name: create persistent directories
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
|
|
Loading…
Reference in New Issue