Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to add gbsyncd in Feature Table of Host Config DB #11754

Merged
merged 22 commits into from
Aug 17, 2022
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4766fcf
[submodule update] sonic-db-syncd
abdosi Apr 3, 2021
9746bb3
Merge remote-tracking branch 'upsteam/master'
abdosi Apr 5, 2021
061821d
Merge remote-tracking branch 'upsteam/master'
abdosi Apr 6, 2021
9e61e53
Merge remote-tracking branch 'upsteam/master'
abdosi Apr 21, 2021
5c3a87f
Merge remote-tracking branch 'upsteam/master'
abdosi Apr 28, 2021
5775c20
Merge remote-tracking branch 'upsteam/master'
abdosi May 14, 2021
3c20361
Merge remote-tracking branch 'upsteam/master'
abdosi May 29, 2021
cc1210d
Merge remote-tracking branch 'upsteam/master'
abdosi Aug 17, 2021
7bae398
Merge remote-tracking branch 'upsteam/master'
abdosi Sep 29, 2021
7126f88
Merge remote-tracking branch 'upsteam/master'
abdosi Oct 13, 2021
63c037c
Merge remote-tracking branch 'upsteam/master'
abdosi Nov 17, 2021
2eb13c6
Merge remote-tracking branch 'upsteam/master'
abdosi Dec 28, 2021
6f09dea
Merge remote-tracking branch 'upsteam/master'
abdosi Jan 13, 2022
cec65fc
Merge remote-tracking branch 'upsteam/master'
abdosi Apr 1, 2022
54f0ea3
Merge remote-tracking branch 'upsteam/master'
abdosi Apr 19, 2022
d1eeb39
Merge remote-tracking branch 'upsteam/master'
abdosi Apr 21, 2022
9a3598e
Merge remote-tracking branch 'upsteam/master'
abdosi May 2, 2022
ea7a084
Merge remote-tracking branch 'upsteam/master'
abdosi May 9, 2022
a92b47d
Merge remote-tracking branch 'upstream/master'
abdosi Jul 15, 2022
3baf0b8
Merge remote-tracking branch 'upstream/master'
abdosi Aug 11, 2022
d49e1f0
Merge remote-tracking branch 'upstream/master'
abdosi Aug 16, 2022
8cdc104
Added Support to update gbsyncd in Feature Table of Global Config DB
abdosi Aug 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions files/scripts/gbsyncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
. /usr/local/bin/syncd_common.sh

function startplatform() {
# Add gbsyncd to FEATURE table, if not in. It did have same config as syncd.
if [ -z $($SONIC_DB_CLI CONFIG_DB HGET 'FEATURE|gbsyncd' state) ]; then
local CMD="local r=redis.call('DUMP', KEYS[1]); redis.call('RESTORE', KEYS[2], 0, r)"
$SONIC_DB_CLI CONFIG_DB EVAL "$CMD" 2 'FEATURE|syncd' 'FEATURE|gbsyncd'
fi

declare -a DbCliArray=($SONIC_DB_CLI $SONIC_DB_NS_CLI)
for DB_CLI in ${DbCliArray[@]}; do
# Add gbsyncd to FEATURE table, if not in. It did have same config as syncd.
if [ -z $($DB_CLI CONFIG_DB HGET 'FEATURE|gbsyncd' state) ]; then
local CMD="local r=redis.call('DUMP', KEYS[1]); redis.call('RESTORE', KEYS[2], 0, r)"
$DB_CLI CONFIG_DB EVAL "$CMD" 2 'FEATURE|syncd' 'FEATURE|gbsyncd'
fi
done
}

function waitplatform() {
Expand All @@ -30,12 +34,11 @@ PEER="swss"
DEBUGLOG="/tmp/swss-$SERVICE-debug$DEV.log"
LOCKFILE="/tmp/swss-$SERVICE-lock$DEV"
NAMESPACE_PREFIX="asic"
SONIC_DB_CLI="sonic-db-cli"
SONIC_DB_NS_CLI="sonic-db-cli"
if [ "$DEV" ]; then
NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace
SONIC_DB_CLI="sonic-db-cli -n $NET_NS"
else
NET_NS=""
SONIC_DB_CLI="sonic-db-cli"
SONIC_DB_NS_CLI="sonic-db-cli -n $NET_NS"
fi

case "$1" in
Expand Down