kolla-ansible/ansible/roles/barbican/templates/barbican-api.json.j2
Doug Szumski 1ff4e58d70 Fix Barbican API log config
There are a few issues fixed here:

- The Barbican API service doesn't set a log file, so all the Barbican API
  service logs go to loadwsgi.py.log by default.
- The logs in loadwsgi.py.log are not ingested properly by Fluentd.
- uWSGI logs go to barbican-api.log. This would normally be used as the log
  file for the Barbican API service logs.

This patch makes the following changes to address the above issues:

- All uWSGI logs (from the Emperor and Vassals) go to barbican_api_uwsgi_access.log
  Although these logs aren't strictly all access logs, this follows the existing
  pattern for WSGI logs.
- The Barbican API service logs are written to barbican-api.log instead of
  loadwsgi.py.log. This follows the pattern used by other OpenStack services.
- Fluentd is configured to parse the Barbican API service logs as it would with
  other OpenStack Python services.

Change-Id: I6d03fa8c81c52b6f061514a836bbd15bb6639aaf
Closes-Bug: #1891343
2021-01-27 17:24:58 +00:00

53 lines
1.8 KiB
Django/Jinja

{
"command": "uwsgi --master --emperor /etc/barbican/vassals --logto /var/log/kolla/barbican/barbican_api_uwsgi_access.log --logfile-chmod 644",
"config_files": [
{
"source": "{{ container_config_directory }}/barbican.conf",
"dest": "/etc/barbican/barbican.conf",
"owner": "barbican",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/vassals/barbican-api.ini",
"dest": "/etc/barbican/vassals/barbican-api.ini",
"owner": "barbican",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/barbican-api-paste.ini",
"dest": "/etc/barbican/barbican-api-paste.ini",
"owner": "barbican",
"perm": "0600",
"optional": true
}{% if barbican_enable_tls_backend | bool %},
{
"source": "{{ container_config_directory }}/barbican-cert.pem",
"dest": "/etc/barbican/certs/barbican-cert.pem",
"owner": "barbican",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/barbican-key.pem",
"dest": "/etc/barbican/certs/barbican-key.pem",
"owner": "barbican",
"perm": "0600"
}{% endif %}{% if barbican_policy_file is defined %},
{
"source": "{{ container_config_directory }}/{{ barbican_policy_file }}",
"dest": "/etc/barbican/{{ barbican_policy_file }}",
"owner": "barbican",
"perm": "0600"
}{% endif %}
],
"permissions": [
{
"path": "/var/lib/barbican",
"owner": "barbican:barbican"
},
{
"path": "/var/log/kolla/barbican",
"owner": "barbican:barbican"
}
]
}