diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index 5c4a0f474b..0730b436eb 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -297,6 +297,7 @@ - { name: "designate", enabled: "{{ enable_designate }}" } - { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" } - { name: "etcd", enabled: "{{ enable_etcd }}" } + - { name: "fluentd", enabled: "yes" } - { name: "freezer", enabled: "{{ enable_freezer }}" } - { name: "glance", enabled: "{{ enable_glance }}" } - { name: "glance-tls-proxy", enabled: "{{ enable_glance }}" } diff --git a/ansible/roles/common/templates/cron-logrotate-fluentd.conf.j2 b/ansible/roles/common/templates/cron-logrotate-fluentd.conf.j2 new file mode 100644 index 0000000000..37c76a5f93 --- /dev/null +++ b/ansible/roles/common/templates/cron-logrotate-fluentd.conf.j2 @@ -0,0 +1,3 @@ +"/var/log/kolla/fluentd/*.log" +{ +} diff --git a/ansible/roles/common/templates/fluentd.json.j2 b/ansible/roles/common/templates/fluentd.json.j2 index 0dc78be3db..94656c2efa 100644 --- a/ansible/roles/common/templates/fluentd.json.j2 +++ b/ansible/roles/common/templates/fluentd.json.j2 @@ -31,7 +31,7 @@ {%- endmacro -%} { - "command": "{{ fluentd_cmd }}", + "command": "{{ fluentd_cmd }} -o /var/log/kolla/fluentd/fluentd.log", "config_files": [ { "source": "{{ container_config_directory }}/td-agent.conf", @@ -46,6 +46,11 @@ {{ config_directory("output") }} ], "permissions": [ + { + "path": "/var/log/kolla/fluentd", + "owner": "{{ fluentd_user }}:{{ fluentd_user }}", + "recurse": true + }, { "path": "/var/log/kolla/haproxy", "owner": "{{ fluentd_user }}:{{ fluentd_user }}", diff --git a/releasenotes/notes/bug-1888852-8735ee29f69f77b5.yaml b/releasenotes/notes/bug-1888852-8735ee29f69f77b5.yaml new file mode 100644 index 0000000000..14dd85e8cd --- /dev/null +++ b/releasenotes/notes/bug-1888852-8735ee29f69f77b5.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + ``fluentd`` is now logging to ``/var/log/kolla/fluentd/fluentd.log`` + instead of ``stdout``. `LP#1888852 `__