Skip to content

Commit 297d1be

Browse files
committed
Do not create haproxy and swift log dirs needlessly
Closes-Bug: #1945070 Change-Id: I1b2a82b57cb9884b6c3c3ad07f6449ae29042a3d (cherry picked from commit 2c6bc0b)
1 parent 5236203 commit 297d1be

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

ansible/roles/common/templates/conf/output/00-local.conf.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{% if enable_swift | bool and (inventory_hostname in groups['swift-proxy-server'] or inventory_hostname in groups['swift-account-server'] or inventory_hostname in groups['swift-container-server'] or inventory_hostname in groups['swift-object-server']) %}
12
<match syslog.{{ syslog_swift_facility }}.**>
23
@type copy
34
<store>
@@ -58,7 +59,9 @@
5859
</store>
5960
{% endif %}
6061
</match>
62+
{% endif %}
6163

64+
{% if enable_haproxy | bool and inventory_hostname in groups['haproxy'] %}
6265
<match syslog.{{ syslog_haproxy_facility }}.**>
6366
@type copy
6467
<store>
@@ -121,6 +124,7 @@
121124
</store>
122125
{% endif %}
123126
</match>
127+
{% endif %}
124128

125129
{% if glance_enable_tls_backend | bool %}
126130
<match syslog.{{ syslog_glance_tls_proxy_facility }}.**>

ansible/roles/common/templates/fluentd.json.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@
2929
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
3030
"recurse": true
3131
},
32+
{% if enable_haproxy | bool and inventory_hostname in groups['haproxy'] %}
3233
{
3334
"path": "/var/log/kolla/haproxy",
3435
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
3536
"recurse": true
3637
},
38+
{% endif %}
3739
{% if glance_enable_tls_backend | bool %}
3840
{
3941
"path": "/var/log/kolla/glance-tls-proxy",
@@ -48,11 +50,13 @@
4850
"recurse": true
4951
},
5052
{% endif %}
53+
{% if enable_swift | bool and (inventory_hostname in groups['swift-proxy-server'] or inventory_hostname in groups['swift-account-server'] or inventory_hostname in groups['swift-container-server'] or inventory_hostname in groups['swift-object-server']) %}
5154
{
5255
"path": "/var/log/kolla/swift",
5356
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
5457
"recurse": true
5558
},
59+
{% endif %}
5660
{
5761
"path": "/var/lib/fluentd/data",
5862
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
No longer creates directories for haproxy and swift logs where they
5+
are not needed.
6+
`LP#1945070 <https://launchpad.net/bugs/1945070>`__

0 commit comments

Comments
 (0)