Skip to content

Commit

Permalink
fix syncd and otss runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic-otn committed Dec 20, 2024
1 parent c161288 commit 1fb376c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
18 changes: 2 additions & 16 deletions dockers/docker-orchagent-ot/orchagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,24 @@ export platform=$(echo $OTSS_VARS | jq -r '.asic_type')

# Create a folder for OTSS record files
mkdir -p /var/log/otss
ORCHAGENT_ARGS="-d /var/log/otss "
ORCHAGENT_ARGS=" "

# Set orchagent pop batch size to 8192
ORCHAGENT_ARGS+="-b 8192 "

# Set synchronous mode if it is enabled in CONFIG_DB
SYNC_MODE=$(echo $OTSS_VARS | jq -r '.synchronous_mode')
if [ "$SYNC_MODE" == "enable" ]; then
ORCHAGENT_ARGS+="-s "
fi

# Check if there is an "asic_id field" in the DEVICE_METADATA in configDB.
#"DEVICE_METADATA": {
# "localhost": {
# ....
# "asic_id": "0",
# }
#},
# ID field could be integers just to denote the asic instance like 0,1,2...
# OR could be PCI device ID's which will be strings like "03:00.0"
# depending on what the SAI/SDK expects.
#}
asic_id=$(echo $OTSS_VARS | jq -r '.asic_id')
if [ -n "$asic_id" ]
then
ORCHAGENT_ARGS+="-i $asic_id "
fi

# for multi asic platforms add the asic name to the record file names
if [[ "$NAMESPACE_ID" ]]; then
ORCHAGENT_ARGS+="-f otss.asic$NAMESPACE_ID.rec -j otairedis.asic$NAMESPACE_ID.rec "
fi

hwsku=`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['hwsku']"`
if [ -n "$hwsku" ]
then
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-otairedis

0 comments on commit 1fb376c

Please sign in to comment.