Cannot change "minsize" and "notifempty" of /etc/logrotate-crond.conf.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Wishlist
|
Ryo Hayakawa |
Bug Description
We cannot change parameters "minsize" and "notifempty" of /etc/logrotate-
This is because parameters "minsize" and "notifempty" are hard coded in the template file[1].
I think this implementation is probably in order to comply with GDPR, but there might be users who don't want to comply with it for some reason such as their internal rule, testing purpose, etc.
Thus, in my opinion, these parameters should be changeable like[2].
Thanks,
[1] templates/
/var/log/
<%= @rotation %>
rotate <%= @rotate %>
maxage <%= @purge_after_days %>
# minsize 1 is required for GDPR compliance, all files in
# /var/log/containers not managed with logrotate will be purged!
minsize 1
# Do not use size as it's not compatible with time-based rotation rules
# required for GDPR compliance.
maxsize <%= @maxsize %>
missingok
notifempty
<%- if @copytruncate %>
copytruncate
<%- end %>
<%- if @delaycompress %>
delaycompress
<%- end %>
<%- if @compress %>
compress
<%- end %>
<%- if @dateext %>
dateext
<%- if @dateformat %>
dateformat <%= @dateformat %>
<%- end %>
<%- if @dateyesterday %>
dateyesterday
<%- end %>
<%- end %>
}
[2] my proposal:
--- /usr/share/
+++ logrotate.pp 2020-06-21 15:39:43.000000000 +0900
@@ -62,10 +62,18 @@
# (optional) Defaults to True.
# Configures the logrotate compress parameter.
#
+# [*minsize*]
+# (optional) Defaults to '1'.
+# Configures the logrotate minsize parameter.
+#
# [*maxsize*]
# (optional) Defaults to '10M'.
# Configures the logrotate maxsize parameter.
#
+# [*notifempty*]
+# (optional) Defaults to True.
+# Configures the logrotate notifempty parameter.
+#
# [*rotation*]
# (optional) Defaults to 'daily'.
# Configures the logrotate rotation interval.
@@ -111,7 +119,9 @@
$delaycompress = true,
$compress = true,
$rotation = 'daily',
+ $minsize = 1,
$maxsize = '10M',
+ $notifempty = true,
$rotate = 14,
$purge_
$dateext = undef,
--- /usr/share/
+++ containers_
@@ -4,12 +4,14 @@
maxage <%= @purge_after_days %>
# minsize 1 is required for GDPR compliance, all files in
# /var/log/containers not managed with logrotate will be purged!
- minsize 1
+ minsize <%= @minsize %>
# Do not use size as it's not compatible with time-based rotation rules
# required for GDPR compliance.
maxsize <%= @maxsize %>
missingok
+<%- if @notifempty %>
notifempty
+<%- end %>
<%- if @copytruncate %>
copytruncate
<%- end %>
Changed in tripleo: | |
assignee: | nobody → Ryo Hayakawa (ryohayakawa) |
description: | updated |
Changed in tripleo: | |
importance: | Undecided → Wishlist |
milestone: | none → victoria-1 |
Fix proposed to branch: master /review. opendev. org/737181
Review: https:/