Fix Cinder log parsing

The Cinder API log is currently written to a file called
cinder-wsgi.log, and the WSGI logs to cinder-api.log. Fluentd
then tries to parse the WSGI log as an OpenStack log which
results in 'got incomplete line' errors and prevents proper
ingestion of these logs.

Co-Authored-By: yaoning <yaoning@unitedstack.com>
Closes-Bug: 1916752
Change-Id: I3296dcc4780160cbf88bd18285571276f58bb249
This commit is contained in:
Doug Szumski 2021-02-24 13:21:51 +00:00
parent e315446291
commit fa5511c75d
3 changed files with 9 additions and 1 deletions

View File

@ -25,7 +25,7 @@ LogLevel info
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/kolla/cinder/cinder-api.log
ErrorLog /var/log/kolla/cinder/cinder-api-error.log
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog /var/log/kolla/cinder/cinder-api-access.log logformat
{% if cinder_enable_tls_backend | bool %}

View File

@ -2,6 +2,9 @@
debug = {{ cinder_logging_debug }}
log_dir = /var/log/kolla/cinder
{% if service_name == "cinder-api" %}
log_file = cinder-api.log
{% endif %}
use_forwarded_for = true
# Set use_stderr to False or the logs will also be sent to stderr

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes some configuration issues around Cinder logging. `LP#1916752
<https://bugs.launchpad.net/kolla-ansible/+bug/1916752>`__