logrotate config settings should not be global
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Eric MacDonald |
Bug Description
Brief Description
-----------------
Several logrotate config files have global rather than file level config settings. These settings will override the default settings in logrotate.conf, and in the create vs. copytruncate setting case will even override file specific config in other logrotate config files.
Note that the create log rotation setting (instead of copytruncate) is beneficial for log scrapers like filebeat that keep track of files via dev/inode.
Severity
--------
<Minor: System/Feature is usable with minor issue>
Steps to Reproduce
------------------
Change the logrotate configuration in /etc/logrotate.
logrotate files with global config settings (** files are worst offenders):
fm.logrotate
nfvi-
pmon.logrotate
fsmon.logrotate
**mtce.logrotate
**mtcalarm.
lmon.logrotate
**hostw.logrotate
**hwmon.logrotate
When the global config options are moved to the file level for the above files, create config for individual files specified in other config files works as expected.
Expected Behavior
------------------
Changing logrotate config files to use create rather than copytruncate should work.
Actual Behavior
----------------
Changing logrotate config files to use create rather than copytruncate does not work.
Reproducibility
---------------
100%
System Configuration
-------
Any and all.
Branch/Pull Time/Commit
-------
March 12 2021 Master, day 1 issue it seems.
Last Pass
---------
N/A
Timestamp/Logs
--------------
N/A
Test Activity
-------------
Developer Testing
Workaround
----------
Move any global sections from the logrotate config files in /etc/logrotate.d into file specific sections.
Changed in starlingx: | |
assignee: | nobody → Eric MacDonald (rocksolidmtce) |
tags: | added: stx.metal |
Changed in starlingx: | |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: stx.config |
The following 4 merged updates address the reported issue
update: Comment out 'dateext' setting in logrotate.conf file /review. opendev. org/c/starlingx /config- files/+ /784943 /opendev. org/starlingx/ config- files/commit/ e87383f6c328efe ab2a9407daa3307 6a85739b96
review: https:/
commit: https:/
update: Modify mtce daemon log rotation config files /review. opendev. org/c/starlingx /metal/ +/785018 /opendev. org/starlingx/ metal/commit/ 3c1e9d960198c04 4e382eb7d47b3bb 70cbf6ba70
review: https:/
commit: https:/
update: Modify nfv and mtce-guest log rotation config files /review. opendev. org/c/starlingx /nfv/+/ 784951 /opendev. org/starlingx/ nfv/commit/ 454c71ddc0ac32b f2ab11e2ec54b88 4249ea63bf
review: https:/
commit: https:/
update: Make small modification to fm's logrotation configuration file /review. opendev. org/c/starlingx /fault/ +/784947 /opendev. org/starlingx/ fault/commit/ 581495082a5a0a9 456065b3d3bb8b5 f015747fd8
review: https:/
commit: https:/