From 4f959746696dcf010bb1d4906f63df1d0c540e1f Mon Sep 17 00:00:00 2001 From: tjchadaga <85581939+tjchadaga@users.noreply.github.com> Date: Tue, 12 Jul 2022 10:08:58 -0700 Subject: [PATCH] Add load_minigraph option to include traffic-shift-away during config migration (#11403) --- files/image_config/config-setup/config-setup | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/files/image_config/config-setup/config-setup b/files/image_config/config-setup/config-setup index b151437b9e..7ddf4530fe 100755 --- a/files/image_config/config-setup/config-setup +++ b/files/image_config/config-setup/config-setup @@ -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 }