forked from sonic-net/sonic-swss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Orch class to separate recorder implementation (sonic-net#2837)
**What I did** 1) Removed the recorder implementation from the Orch class and added a new Recorder Interface 2) Removed the exposure of recorder related global variables from the CfgMgrs and Orchagent 3) Writing the Kfv tuple to the Rec file was moved from the Orch class into the ConsumerBase 4) Moved the gBatchSize declaration into the Orch and thereby removing the need to explicitly declare the global variable in CfgMgrs **Why I did it** Recorder implementation should not be tied to Orchagent **How I verified it** Install the swss on the switch and verified ``` root@r-lionfish-16:/home/admin# show logging | grep Recorder Jun 23 19:26:15.741815 sonic NOTICE swss#orchagent: :- startRec: SwSS Recorder: Recording started at /var/log/swss/swss.rec Jun 23 19:29:09.514177 sonic INFO swss#orchagent: :- logfileReopen: SwSS Recorder: LogRotate request handled ``` **Verify Logrotate:** ``` root@r-lionfish-16:/home/admin# ls -l /var/log/swss/ total 2752 -rw-r--r-- 1 root root 999877 Jun 23 19:26 sairedis.rec -rw-r--r-- 1 root root 1559947 Jun 23 19:11 sairedis.rec.1 -rw-r--r-- 1 root root 110563 Jun 23 19:27 swss.rec -rw-r--r-- 1 root root 141713 Jun 23 19:16 swss.rec.1 root@r-lionfish-16:/home/admin# logrotate -f /etc/logrotate.conf (Force Logrotate) root@r-lionfish-16:/home/admin# ls -l /var/log/swss/ total 1232 -rw-r--r-- 1 root root 140 Jun 23 19:28 sairedis.rec -rw-r--r-- 1 root root 999877 Jun 23 19:26 sairedis.rec.1 -rw-r--r-- 1 root root 126798 Jun 23 19:11 sairedis.rec.2.gz -rw-r--r-- 1 root root 0 Jun 23 19:28 swss.rec -rw-r--r-- 1 root root 110563 Jun 23 19:27 swss.rec.1 -rw-r--r-- 1 root root 13089 Jun 23 19:16 swss.rec.2.gz <After some time> root@r-lionfish-16:/home/admin# ls -l /var/log/swss/ total 1476 -rw-r--r-- 1 root root 242404 Jun 23 19:29 sairedis.rec -rw-r--r-- 1 root root 999877 Jun 23 19:26 sairedis.rec.1 -rw-r--r-- 1 root root 126798 Jun 23 19:11 sairedis.rec.2.gz -rw-r--r-- 1 root root 1764 Jun 23 19:29 swss.rec -rw-r--r-- 1 root root 110645 Jun 23 19:29 swss.rec.1 -rw-r--r-- 1 root root 13089 Jun 23 19:16 swss.rec.2.gz ```
- Loading branch information
Showing
35 changed files
with
306 additions
and
477 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.