Fix Logrotate rules for VIM
nfv-vim-alarms.log & nfv-vim-events.log were not log rotating The causes were - permission was not properly assigned during file installation. Originally it is 755 and it is changed to 644. - The character "_" does not accept by logrotate tool, it is changed to "-". - Add one rule to fm logs, such that everytime after logrotate, a new empty file is generated right away. Change-Id: Ifc6d633a1f0efa75c8e6ba4005198223d6ec5120 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
49ddf1710d
commit
27e12e4691
|
@ -102,7 +102,7 @@ install -p -D -m 600 nfv-plugins/nfv_plugins/event_log_handlers/config.ini %{bui
|
|||
install -d -m 755 %{buildroot}/etc/nfv/nfv_plugins/nfvi_plugins/
|
||||
install -p -D -m 600 nfv-plugins/nfv_plugins/nfvi_plugins/config.ini %{buildroot}/etc/nfv/nfv_plugins/nfvi_plugins/config.ini
|
||||
install -d -m 755 %{buildroot}/
|
||||
install -p -D -m 755 nfv-plugins/scripts/nfvi_plugins.logrotate %{buildroot}/etc/logrotate.d/nfvi_plugins.logrotate
|
||||
install -p -D -m 644 nfv-plugins/scripts/nfvi-plugins.logrotate %{buildroot}/etc/logrotate.d/nfvi-plugins.logrotate
|
||||
|
||||
# nfv-vim
|
||||
install -d -m 755 %{buildroot}/usr/lib/ocf/resource.d/nfv
|
||||
|
@ -136,7 +136,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%defattr(-,root,root,-)
|
||||
%doc nfv-plugins/LICENSE
|
||||
%dir /etc/logrotate.d/
|
||||
/etc/logrotate.d/nfvi_plugins.logrotate
|
||||
/etc/logrotate.d/nfvi-plugins.logrotate
|
||||
%dir /etc/nfv/nfv_plugins/
|
||||
%config(noreplace)/etc/nfv/nfv_plugins/alarm_handlers/config.ini
|
||||
%config(noreplace)/etc/nfv/nfv_plugins/event_log_handlers/config.ini
|
||||
|
|
8
nfv/nfv-plugins/scripts/nfvi_plugins.logrotate → nfv/nfv-plugins/scripts/nfvi-plugins.logrotate
Executable file → Normal file
8
nfv/nfv-plugins/scripts/nfvi_plugins.logrotate → nfv/nfv-plugins/scripts/nfvi-plugins.logrotate
Executable file → Normal file
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2015-2016 Wind River Systems, Inc.
|
||||
# Copyright (c) 2015-2018 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
@ -8,7 +8,7 @@ nodateext
|
|||
/var/log/nfv-vim-alarms.log
|
||||
{
|
||||
nodateext
|
||||
size 100M
|
||||
size 10M
|
||||
start 1
|
||||
missingok
|
||||
rotate 20
|
||||
|
@ -19,7 +19,7 @@ nodateext
|
|||
/var/log/nfv-vim-events.log
|
||||
{
|
||||
nodateext
|
||||
size 100M
|
||||
size 10M
|
||||
start 1
|
||||
missingok
|
||||
rotate 20
|
||||
|
@ -30,7 +30,7 @@ nodateext
|
|||
/var/log/nfvi-openstack.log
|
||||
{
|
||||
nodateext
|
||||
size 100M
|
||||
size 10M
|
||||
start 1
|
||||
missingok
|
||||
rotate 20
|
Loading…
Reference in New Issue