From ae670b7bc7fcb7b9749c0787156ad9c0536b6fb7 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 18 Nov 2020 19:30:45 +0000 Subject: [PATCH] [frr] remove frr rsyslog file outchannel SONiC runs FRR inside a docker, the logs are captured in base image. Leaving file outchannel inside docker will generate log file inside the docker and take harddrive space unnecessarily. Signed-off-by: Ying Xie --- ...rr-log-outchannel-to-var-log-frr.log.patch | 31 +++++++++++++++++++ src/sonic-frr/patch/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 src/sonic-frr/patch/0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch diff --git a/src/sonic-frr/patch/0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch b/src/sonic-frr/patch/0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch new file mode 100644 index 000000000000..2802c99e5943 --- /dev/null +++ b/src/sonic-frr/patch/0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch @@ -0,0 +1,31 @@ +From 1f150992b074d07bce5157d203319512a3aeb4dc Mon Sep 17 00:00:00 2001 +From: Ying Xie +Date: Wed, 18 Nov 2020 19:24:51 +0000 +Subject: [PATCH] [frr] remove frr log outchannel to /var/log/frr.log + +SONiC runs frr inside a docker and the logs are sent to base image +via rsyslog and recorded already. There is no need to keep the +frr.log inside the docker. It will grow and take all harddrive +space eventually. + +Signed-off-by: Ying Xie +--- + tools/etc/rsyslog.d/45-frr.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/etc/rsyslog.d/45-frr.conf b/tools/etc/rsyslog.d/45-frr.conf +index ff7cd4831..af3c2c109 100644 +--- a/tools/etc/rsyslog.d/45-frr.conf ++++ b/tools/etc/rsyslog.d/45-frr.conf +@@ -2,7 +2,7 @@ + # to /var/log/frr/frr.log, then drops the message so it does + # not also go to /var/log/syslog, so the messages are not duplicated + +-$outchannel frr_log,/var/log/frr/frr.log ++$outchannel frr_log + if $programname == 'babeld' or + $programname == 'bgpd' or + $programname == 'eigrpd' or +-- +2.17.1 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 13619c87ff65..4a7ea0fd112a 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -4,3 +4,4 @@ 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch 0005-nexthops-compare-vrf-only-if-ip-type.patch 0006-changes-for-making-snmp-socket-non-blocking.patch +0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch