logrotate is a subordinate charm that ensure that all logrotate.d configurations within /etc/logrotate.d/ folder are modified accordingly to a retention period defined in the charm
The config option "override" will silently accept incomplete "override" options.
In charm-logrotated rev 10, the "override" option accept a JSON formatted string to override the logrotate directives for each file in "/etc/logrotate.d/". The JSON formatted string can be
. In this example, this will override directives "rotate" and "interval" "for /etc/logrotate.d/rotatefile". However, if not all "path", "rotate", "interval" are provided, the charm will ignore this config option without warning or error. For example, if one provides the following string to "override":
It will not override directive "interval" for "/etc/logrotate.d/rotatefile". I am not sure if this is the expected behavior for this option, at least it is not documented in the config option.
The config option "override" will silently accept incomplete "override" options.
In charm-logrotated rev 10, the "override" option accept a JSON formatted string to override the logrotate directives for each file in "/etc/logrotate.d/". The JSON formatted string can be
'[ {"path": "/etc/logrotate.d/rotatefile", "rotate": 5, "interval": "weekly"} ]'
. In this example, this will override directives "rotate" and "interval" "for /etc/logrotate.d/rotatefile". However, if not all "path", "rotate", "interval" are provided, the charm will ignore this config option without warning or error. For example, if one provides the following string to "override":
'[ {"path": "/etc/logrotate.d/rotatefile", "interval": "daily"} ]'
It will not override directive "interval" for "/etc/logrotate.d/rotatefile". I am not sure if this is the expected behavior for this option, at least it is not documented in the config option.
Reference line that causes the issue: https://git.launchpad.net/charm-logrotated/tree/src/lib/lib_logrotate.py#n55
Imported from Launchpad using lp2gh.
date created: 2023-04-28T06:21:33Z
owner: raychan96
assignee: raychan96
the launchpad url