From 454c71ddc0ac32bf2ab11e2ec54b884249ea63bf Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Tue, 6 Apr 2021 09:11:49 -0400 Subject: [PATCH] Modify nfv and mtce-guest log rotation config files This updates make the following setting changes to the nfv log rotation configuration files - add 'create' with permissions to guest conf files - add 'delaycompress' option - remove all global settings - remove the nodateext setting Test Plan: PASS: Verify log rotation file naming convention PASS: Verify delaycompress option PASS: Verify log permissions after rotate are 0640 Change-Id: I033ee0585aedd7c70ff55f2ce3eb70867b78097c Partial-Bug: 1918979 Depends-On: https://review.opendev.org/c/starlingx/config-files/+/784943 Signed-off-by: Eric MacDonald --- mtce-guest/src/scripts/guestAgent.logrotate | 16 +++++++++------- mtce-guest/src/scripts/guestServer.logrotate | 17 +++++++++-------- nfv/nfv-plugins/scripts/nfvi-plugins.logrotate | 4 ---- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/mtce-guest/src/scripts/guestAgent.logrotate b/mtce-guest/src/scripts/guestAgent.logrotate index 654a7135..d5f9b2c7 100644 --- a/mtce-guest/src/scripts/guestAgent.logrotate +++ b/mtce-guest/src/scripts/guestAgent.logrotate @@ -1,16 +1,18 @@ -#daily +## Copyright (c) 2015-2021 Wind River Systems, Inc. +## +## SPDX-License-Identifier: Apache-2.0 /var/log/guestAgent.log { - nodateext - size 10M - rotate 5 + create 0640 root root start 1 - missingok - notifempty + rotate 5 + size 10M compress - sharedscripts + notifempty + missingok postrotate systemctl reload syslog-ng > /dev/null 2>&1 || true endscript + delaycompress } diff --git a/mtce-guest/src/scripts/guestServer.logrotate b/mtce-guest/src/scripts/guestServer.logrotate index 9b54a875..e08b6a92 100644 --- a/mtce-guest/src/scripts/guestServer.logrotate +++ b/mtce-guest/src/scripts/guestServer.logrotate @@ -1,17 +1,18 @@ -#daily -nodateext +## Copyright (c) 2015-2021 Wind River Systems, Inc. +## +## SPDX-License-Identifier: Apache-2.0 /var/log/guestServer.log { - nodateext - size 10M - rotate 5 + create 0640 root root start 1 - missingok - notifempty + rotate 5 + size 10M compress - sharedscripts + notifempty + missingok postrotate systemctl reload syslog-ng > /dev/null 2>&1 || true endscript + delaycompress } diff --git a/nfv/nfv-plugins/scripts/nfvi-plugins.logrotate b/nfv/nfv-plugins/scripts/nfvi-plugins.logrotate index 7a13b5be..fde91ba8 100644 --- a/nfv/nfv-plugins/scripts/nfvi-plugins.logrotate +++ b/nfv/nfv-plugins/scripts/nfvi-plugins.logrotate @@ -3,11 +3,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -nodateext /var/log/nfv-vim-alarms.log { - nodateext size 10M start 1 missingok @@ -18,7 +16,6 @@ nodateext /var/log/nfv-vim-events.log { - nodateext size 10M start 1 missingok @@ -29,7 +26,6 @@ nodateext /var/log/nfvi-openstack.log { - nodateext size 10M start 1 missingok