Delete stale fluent config on restart

We already only include .conf files in fluent.conf:

(fluentd)[fluentd@cpu-e-1041 /etc/fluentd]$ cat fluent.conf
@include input/*.conf
@include filter/*.conf
@include format/*.conf
@include output/*.conf

so this change should not cause ill effect. This works because of the
merge option in config files:

merge: merges the source directory into the target directory instead of
replacing it. Boolean, defaults to false.

see https://docs.openstack.org/kolla/latest/admin/kolla_api.html#kolla-api-external-config

Change-Id: I28f63ec81f1ea5bc4a213d053bfb2c04388d5925
Closes-Bug: #1862211
This commit is contained in:
Will Szumski 2020-02-06 17:10:06 +00:00 committed by Radosław Piliszek
parent c5b4ca4f1f
commit e7870e9df9
2 changed files with 15 additions and 8 deletions

View File

@ -25,32 +25,32 @@
{# Copy all configuration files in input/ directory to include #} {# Copy all configuration files in input/ directory to include #}
{# custom input configs. #} {# custom input configs. #}
{ {
"source": "{{ container_config_directory }}/input/*.conf", "source": "{{ container_config_directory }}/input",
"dest": "{{ fluentd_dir }}/input/", "dest": "{{ fluentd_dir }}/input",
"owner": "{{ fluentd_user }}", "owner": "{{ fluentd_user }}",
"perm": "0600" "perm": "0600"
}, },
{# Copy all configuration files in filter/ directory to include #} {# Copy all configuration files in filter/ directory to include #}
{# custom filter configs. #} {# custom filter configs. #}
{ {
"source": "{{ container_config_directory }}/filter/*.conf", "source": "{{ container_config_directory }}/filter",
"dest": "{{ fluentd_dir }}/filter/", "dest": "{{ fluentd_dir }}/filter",
"owner": "{{ fluentd_user }}", "owner": "{{ fluentd_user }}",
"perm": "0600" "perm": "0600"
}, },
{# Copy all configuration files in format/ directory to include #} {# Copy all configuration files in format/ directory to include #}
{# custom format configs. #} {# custom format configs. #}
{ {
"source": "{{ container_config_directory }}/format/*.conf", "source": "{{ container_config_directory }}/format",
"dest": "{{ fluentd_dir }}/format/", "dest": "{{ fluentd_dir }}/format",
"owner": "{{ fluentd_user }}", "owner": "{{ fluentd_user }}",
"perm": "0600" "perm": "0600"
}, },
{# Copy all configuration files in output/ directory to include #} {# Copy all configuration files in output/ directory to include #}
{# custom output configs. #} {# custom output configs. #}
{ {
"source": "{{ container_config_directory }}/output/*.conf", "source": "{{ container_config_directory }}/output",
"dest": "{{ fluentd_dir }}/output/", "dest": "{{ fluentd_dir }}/output",
"owner": "{{ fluentd_user }}", "owner": "{{ fluentd_user }}",
"perm": "0600" "perm": "0600"
} }

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixes an issue where old fluentd configuration files would persist
in the container across restarts despite being removed from the
``node_custom_config`` directory.
`LP#1862211 <https://launchpad.net/bugs/1862211>`__