This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/src/sonic-frr/patch/0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch
Ying Xie 7f21c0be1a
[FRR] remove the whole block of outchannel properly (#6045)
- Why I did it
Fix issue #6043

- How I did it
We are disabling in container frr log. The log entries are sent to base image and are logged in /var/log/quagga/bgpd.log.

However, we need to remove the whole outchannel config block to avoid an error message raised by rsyslogd.

- How to verify it
Without the change, test_autorestart bgp container will fail on loganalyer errors. With the change, restarting bgp container is no longer generating error message and the test will pass.

The log generated by frr continued appearing in /var/log/quagga/bgpd.log
2020-11-26 16:50:32 -08:00

49 lines
1.6 KiB
Diff

From 31464e3fd0f677bc15286e99d4a30e2e33480c53 Mon Sep 17 00:00:00 2001
From: Ying Xie <ying.xie@microsoft.com>
Date: Wed, 25 Nov 2020 22:28:43 +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 <ying.xie@microsoft.com>
---
tools/etc/rsyslog.d/45-frr.conf | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/tools/etc/rsyslog.d/45-frr.conf b/tools/etc/rsyslog.d/45-frr.conf
index feeeb13f1..fcd23d23a 100644
--- a/tools/etc/rsyslog.d/45-frr.conf
+++ b/tools/etc/rsyslog.d/45-frr.conf
@@ -2,25 +2,6 @@
# 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
-if $programname == 'babeld' or
- $programname == 'bgpd' or
- $programname == 'eigrpd' or
- $programname == 'frr' or
- $programname == 'isisd' or
- $programname == 'fabricd' or
- $programname == 'ldpd' or
- $programname == 'nhrpd' or
- $programname == 'ospf6d' or
- $programname == 'ospfd' or
- $programname == 'pimd' or
- $programname == 'ripd' or
- $programname == 'ripngd' or
- $programname == 'vrrpd' or
- $programname == 'watchfrr' or
- $programname == 'zebra'
- then :omfile:$frr_log
-
if $programname == 'babeld' or
$programname == 'bgpd' or
$programname == 'eigrpd' or
--
2.17.1