diff --git a/ansible/roles/barbican/templates/barbican-api.ini.j2 b/ansible/roles/barbican/templates/barbican-api.ini.j2
index e8dad55f12..d0dfbbd37e 100644
--- a/ansible/roles/barbican/templates/barbican-api.ini.j2
+++ b/ansible/roles/barbican/templates/barbican-api.ini.j2
@@ -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
diff --git a/ansible/roles/barbican/templates/barbican-api.json.j2 b/ansible/roles/barbican/templates/barbican-api.json.j2
index e28191aae1..a807c17ea4 100644
--- a/ansible/roles/barbican/templates/barbican-api.json.j2
+++ b/ansible/roles/barbican/templates/barbican-api.json.j2
@@ -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",
diff --git a/ansible/roles/barbican/templates/barbican.conf.j2 b/ansible/roles/barbican/templates/barbican.conf.j2
index 1c858fa6dd..62412b21ef 100644
--- a/ansible/roles/barbican/templates/barbican.conf.j2
+++ b/ansible/roles/barbican/templates/barbican.conf.j2
@@ -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 }}
diff --git a/ansible/roles/common/templates/conf/filter/01-rewrite-0.12.conf.j2 b/ansible/roles/common/templates/conf/filter/01-rewrite-0.12.conf.j2
index 26d8395776..1c607c8ad6 100644
--- a/ansible/roles/common/templates/conf/filter/01-rewrite-0.12.conf.j2
+++ b/ansible/roles/common/templates/conf/filter/01-rewrite-0.12.conf.j2
@@ -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
diff --git a/ansible/roles/common/templates/conf/filter/01-rewrite-0.14.conf.j2 b/ansible/roles/common/templates/conf/filter/01-rewrite-0.14.conf.j2
index c6d58f39d3..8ba4468ce4 100644
--- a/ansible/roles/common/templates/conf/filter/01-rewrite-0.14.conf.j2
+++ b/ansible/roles/common/templates/conf/filter/01-rewrite-0.14.conf.j2
@@ -8,7 +8,7 @@
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
@@ -58,7 +58,7 @@
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
diff --git a/releasenotes/notes/fix-barbican-logging-42068f47fe1e4e4d.yaml b/releasenotes/notes/fix-barbican-logging-42068f47fe1e4e4d.yaml
new file mode 100644
index 0000000000..96d13b6de4
--- /dev/null
+++ b/releasenotes/notes/fix-barbican-logging-42068f47fe1e4e4d.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+ - |
+ Fixes some configuration issues around Barbican logging. `LP#1891343
+ `__