From 76d4a054cfc4db7c0c6c419bc858e5290a42ed8a Mon Sep 17 00:00:00 2001 From: Doug Szumski Date: Mon, 8 Nov 2021 17:15:49 +0000 Subject: [PATCH] Specify log file name for Nova API When only the directory is specified, separate log files are created for the Nova API / metadata services with a -wsgi postfix. This affects the 'programname' field in Fluentd which affects the processing of these logs. This is a regression. When the log file name is specified, the directory is not required. Closes-Bug: #1950185 Change-Id: I8fec8b787349f83c05d8af7f52fc58da7c3e9cc4 --- ansible/roles/nova/templates/nova.conf.j2 | 5 ++++- .../bugfix-nova-api-log-file-name-9a377525e73012de.yaml | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bugfix-nova-api-log-file-name-9a377525e73012de.yaml diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index c30409f2bb..6f828cd816 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -2,9 +2,12 @@ [DEFAULT] debug = {{ nova_logging_debug }} -log_dir = /var/log/kolla/nova {% if service_name == "nova-super-conductor" %} log_file = /var/log/kolla/nova/nova-super-conductor.log +{% elif service_name == "nova-api" %} +log_file = /var/log/kolla/nova/nova-api.log +{% else %} +log_dir = /var/log/kolla/nova {% endif %} state_path = /var/lib/nova diff --git a/releasenotes/notes/bugfix-nova-api-log-file-name-9a377525e73012de.yaml b/releasenotes/notes/bugfix-nova-api-log-file-name-9a377525e73012de.yaml new file mode 100644 index 0000000000..f29da24c1a --- /dev/null +++ b/releasenotes/notes/bugfix-nova-api-log-file-name-9a377525e73012de.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes an issue where the Nova API logs were written to + files ending with `-wsgi.log` which affected the processing of + these logs in the Fluentd pipeline. + `LP#1950185 `__