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 (#11403)
  • Loading branch information
tjchadaga authored and qiluo-msft committed Jul 27, 2022
1 parent db37325 commit 6c2f99a
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 6c2f99a

Please sign in to comment.