Skip to content

Commit

Permalink
[PINS] Add APPL_STATE_DB and response path log
Browse files Browse the repository at this point in the history
- Add APPL_STATE_DB to database_config.json
- Clear APPL_STATE_DB during SwSS container restarts
- Add response path log file to logrotate config:
    responsepublisher.rec

Submission containing materials of a third party:
    Copyright Google LLC; Licensed under Apache 2.0

Co-authored-by: Mike Attig <mikeattig@google.com>
Co-authored-by: Runming Wu <runmingwu@google.com>
Co-authored-by: Akarsh Gupta <akarshgupta@google.com>

Signed-off-by: Brian O'Connor <bocon@opennetworking.org>
  • Loading branch information
PINS Working Group authored and mint570 committed Nov 24, 2021
1 parent 11a93d2 commit 1baca65
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dockers/docker-database/database_config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
"id" : 13,
"separator": "|",
"instance" : "redis_chassis"
},
"APPL_STATE_DB" : {
"id" : 14,
"separator": ":",
"instance" : "redis"
}
},
"VERSION" : "1.0"
Expand Down
1 change: 1 addition & 0 deletions files/image_config/logrotate/logrotate.d/rsyslog
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
/var/log/frr/zebra.log
/var/log/swss/sairedis*.rec
/var/log/swss/swss*.rec
/var/log/swss/responsepublisher.rec
{
size 1M
rotate 5000
Expand Down
1 change: 1 addition & 0 deletions files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ start() {
$SONIC_DB_CLI GB_COUNTERS_DB FLUSHDB
$SONIC_DB_CLI RESTAPI_DB FLUSHDB
clean_up_tables STATE_DB "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'LAG_TABLE*', 'LAG_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*', 'FDB_TABLE*', 'FG_ROUTE_TABLE*', 'BUFFER_POOL*', 'BUFFER_PROFILE*', 'MUX_CABLE_TABLE*'"
$SONIC_DB_CLI APPL_STATE_DB FLUSHDB
fi

# On supervisor card, skip starting asic related services here. In wait(),
Expand Down
5 changes: 5 additions & 0 deletions platform/vs/docker-sonic-vs/database_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
"id" : 12,
"separator": "|",
"instance" : "redis_chassis"
},
"APPL_STATE_DB" : {
"id" : 14,
"separator": ":",
"instance" : "redis"
}
},
"VERSION" : "1.0"
Expand Down

0 comments on commit 1baca65

Please sign in to comment.