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
This commit is contained in:
parent
01c0c39fb0
commit
1ff4e58d70
@ -12,3 +12,4 @@ memory-report = true
|
||||
plugins = python3
|
||||
paste = config:/etc/barbican/barbican-api-paste.ini
|
||||
add-header = Connection: close
|
||||
logto = /var/log/kolla/barbican/barbican_api_uwsgi_access.log
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"command": "uwsgi --master --emperor /etc/barbican/vassals --logto /var/log/kolla/barbican/barbican-api.log --logfile-chmod 644",
|
||||
"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",
|
||||
|
@ -1,6 +1,9 @@
|
||||
[DEFAULT]
|
||||
debug = {{ barbican_logging_debug }}
|
||||
log_dir = /var/log/kolla/barbican
|
||||
{% if service_name == "barbican-api" %}
|
||||
log_file = barbican-api.log
|
||||
{% endif %}
|
||||
|
||||
bind_port = {{ barbican_api_listen_port }}
|
||||
bind_host = {{ api_interface_address }}
|
||||
|
@ -2,7 +2,7 @@
|
||||
@type rewrite_tag_filter
|
||||
capitalize_regex_backreference yes
|
||||
rewriterule1 programname ^(cinder-api-access|cloudkitty-api-access|gnocchi-api-access|horizon-access|keystone-apache-admin-access|keystone-apache-public-access|monasca-api-access|placement-api-access|panko-api-access)$ apache_access
|
||||
rewriterule2 programname ^(aodh_wsgi_access|barbican-api|zun_api_wsgi_access|vitrage_wsgi_access)$ wsgi_access
|
||||
rewriterule2 programname ^(aodh_wsgi_access|barbican_api_uwsgi_access|zun_api_wsgi_access|vitrage_wsgi_access)$ wsgi_access
|
||||
rewriterule3 programname ^(nova-api|nova-compute|nova-compute-ironic|nova-conductor|nova-manage|nova-novncproxy|nova-scheduler|nova-placement-api|placement-api|privsep-helper)$ openstack_python
|
||||
rewriterule4 programname ^(sahara-api|sahara-engine)$ openstack_python
|
||||
rewriterule5 programname ^(neutron-server|neutron-openvswitch-agent|neutron-ns-metadata-proxy|neutron-metadata-agent|neutron-l3-agent|neutron-dhcp-agent)$ openstack_python
|
||||
@ -12,7 +12,7 @@
|
||||
rewriterule9 programname ^(glance-api)$ openstack_python
|
||||
rewriterule10 programname ^(cloudkitty-storage-init|cloudkitty-processor|cloudkitty-dbsync|cloudkitty-api)$ openstack_python
|
||||
rewriterule11 programname ^(ceilometer-polling|ceilometer-agent-notification)$ openstack_python
|
||||
rewriterule12 programname ^(barbican-worker|barbican-keystone-listener|barbican-db-manage|app)$ openstack_python
|
||||
rewriterule12 programname ^(barbican-api|barbican-worker|barbican-keystone-listener|barbican-db-manage|app)$ openstack_python
|
||||
rewriterule13 programname ^(aodh-notifier|aodh-listener|aodh-evaluator|aodh-dbsync)$ openstack_python
|
||||
rewriterule14 programname ^(cinder-api|cinder-scheduler|cinder-manage|cinder-volume|cinder-backup|privsep-helper)$ openstack_python
|
||||
rewriterule15 programname ^(mistral-server|mistral-engine|mistral-executor)$ openstack_python
|
||||
|
@ -8,7 +8,7 @@
|
||||
</rule>
|
||||
<rule>
|
||||
key programname
|
||||
pattern ^(aodh_wsgi_access|barbican-api|zun_api_wsgi_access|vitrage_wsgi_access)$
|
||||
pattern ^(aodh_wsgi_access|barbican_api_uwsgi_access|zun_api_wsgi_access|vitrage_wsgi_access)$
|
||||
tag wsgi_access
|
||||
</rule>
|
||||
<rule>
|
||||
@ -58,7 +58,7 @@
|
||||
</rule>
|
||||
<rule>
|
||||
key programname
|
||||
pattern ^(barbican-worker|barbican-keystone-listener|barbican-db-manage|app)$
|
||||
pattern ^(barbican-api|barbican-worker|barbican-keystone-listener|barbican-db-manage|app)$
|
||||
tag openstack_python
|
||||
</rule>
|
||||
<rule>
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes some configuration issues around Barbican logging. `LP#1891343
|
||||
<https://bugs.launchpad.net/kolla-ansible/+bug/1891343>`__
|
Loading…
Reference in New Issue
Block a user