Skip to content

Commit

Permalink
Add VRF parameter to orchagent and GNMI start script.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuh-80 committed Oct 24, 2024
1 parent c2f88d0 commit 903b997
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,10 @@ if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then
fi
fi

# Add VRF parameter when mgmt-vrf enabled
MGMT_VRF_ENABLED=`sonic-db-cli CONFIG_DB hget "MGMT_VRF_CONFIG|vrf_global" "mgmtVrfEnabled"`
if [[ x"${MGMT_VRF_ENABLED}" == x"true" ]]; then
ORCHAGENT_ARGS+=" -v mgmt"
fi

exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
6 changes: 6 additions & 0 deletions dockers/docker-sonic-gnmi/gnmi-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,10 @@ else
fi
fi

# Add VRF parameter when mgmt-vrf enabled
MGMT_VRF_ENABLED=`sonic-db-cli CONFIG_DB hget "MGMT_VRF_CONFIG|vrf_global" "mgmtVrfEnabled"`
if [[ x"${MGMT_VRF_ENABLED}" == x"true" ]]; then
TELEMETRY_ARGS+=" -vrf=mgmt"
fi

exec /usr/sbin/telemetry ${TELEMETRY_ARGS}

0 comments on commit 903b997

Please sign in to comment.