Skip to content

Commit

Permalink
Add load_minigraph option to include traffic-shift-away during config…
Browse files Browse the repository at this point in the history
… migration (sonic-net#11403)
  • Loading branch information
tjchadaga authored and yxieca committed Jul 28, 2022
1 parent 948c932 commit 0c7f0aa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion files/image_config/config-setup/config-setup
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,15 @@ run_hookdir() {
reload_minigraph()
{
echo "Reloading minigraph..."
config load_minigraph -y -n
if
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] ||
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.type | tr [:upper:] [:lower:])" == *"leafrouter"* ]];
then
#Keep device isolated with traffic-shift-away option on LeafRouter and Dualtor
config load_minigraph -y -n -t
else
config load_minigraph -y -n
fi
config save -y
}

Expand Down

0 comments on commit 0c7f0aa

Please sign in to comment.