Skip to content

Commit 6cbbab1

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix log rotation for fluentd created files" into stable/wallaby
2 parents d4b3c40 + b33c6fa commit 6cbbab1

File tree

3 files changed

+44
-23
lines changed

3 files changed

+44
-23
lines changed

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

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
@type copy
44
<store>
55
@type file
6-
path /var/log/kolla/swift/swift_latest.*.log
6+
path /var/log/kolla/swift/swift_latest
77
append true
8-
compress gzip
9-
<buffer>
10-
timekey_use_utc
8+
# Disable timestamp in filename for logs
9+
<buffer []>
10+
path /var/log/kolla/swift/swift_latest.*.buffer
1111
</buffer>
1212
</store>
1313
{% if log_direct_to_elasticsearch %}
@@ -66,14 +66,17 @@
6666
@type copy
6767
<store>
6868
@type file
69-
path /var/log/kolla/haproxy/haproxy_latest.*.log
70-
output_tag false
71-
output_time false
69+
path /var/log/kolla/haproxy/haproxy_latest
7270
append true
73-
compress gzip
74-
<buffer>
75-
timekey_use_utc
71+
# Disable timestamp in filename for logs
72+
<buffer []>
73+
path /var/log/kolla/haproxy/haproxy_latest.*.buffer
7674
</buffer>
75+
# Don't prepend syslog tag or timestamp to log output
76+
<format>
77+
output_tag false
78+
output_time false
79+
</format>
7780
</store>
7881
{% if log_direct_to_elasticsearch %}
7982
<store>
@@ -131,14 +134,17 @@
131134
@type copy
132135
<store>
133136
@type file
134-
path /var/log/kolla/glance-tls-proxy/glance-tls-proxy.*.log
135-
output_tag false
136-
output_time false
137+
path /var/log/kolla/glance-tls-proxy/glance-tls-proxy
137138
append true
138-
compress gzip
139-
<buffer>
140-
timekey_use_utc
139+
# Disable timestamp in filename for logs
140+
<buffer []>
141+
path /var/log/kolla/glance-tls-proxy/glance-tls-proxy.*.buffer
141142
</buffer>
143+
# Don't prepend syslog tag or timestamp to log output
144+
<format>
145+
output_tag false
146+
output_time false
147+
</format>
142148
</store>
143149
{% if log_direct_to_elasticsearch %}
144150
<store>
@@ -193,14 +199,17 @@
193199
@type copy
194200
<store>
195201
@type file
196-
path /var/log/kolla/neutron-tls-proxy/neutron-tls-proxy.*.log
197-
output_tag false
198-
output_time false
202+
path /var/log/kolla/neutron-tls-proxy/neutron-tls-proxy
199203
append true
200-
compress gzip
201-
<buffer>
202-
timekey_use_utc
204+
# Disable timestamp in filename for logs
205+
<buffer []>
206+
path /var/log/kolla/neutron-tls-proxy/neutron-tls-proxy.*.buffer
203207
</buffer>
208+
# Don't prepend syslog tag or timestamp to log output
209+
<format>
210+
output_tag false
211+
output_time false
212+
</format>
204213
</store>
205214
{% if log_direct_to_elasticsearch %}
206215
<store>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
"/var/log/kolla/haproxy/haproxy.log"
1+
"/var/log/kolla/haproxy/*.log"
22
{
33
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
issues:
3+
- |
4+
Existing fluentd log rotation failed to delete old haproxy, swift,
5+
glance-tls-proxy and neutron-tls-proxy logs. These will not be
6+
deleted by the new logrotate config and will have to be removed
7+
manually.
8+
fixes:
9+
- |
10+
Existing fluentd log rotation failed to delete old haproxy, swift,
11+
glance-tls-proxy and neutron-tls-proxy logs. Standardise rotation
12+
and deletion of logs using logrotate.

0 commit comments

Comments
 (0)