diff --git a/config/main.py b/config/main.py index b9d560bdfe93..9d804b47d597 100644 --- a/config/main.py +++ b/config/main.py @@ -1515,11 +1515,6 @@ def load_minigraph(db, no_service_restart): clicommon.run_command(command, display_cmd=True) client.set(config_db.INIT_INDICATOR, 1) - # get the device type - device_type = _get_device_type() - if device_type != 'MgmtToRRouter' and device_type != 'MgmtTsToR' and device_type != 'EPMS': - clicommon.run_command("pfcwd start_default", display_cmd=True) - # Update SONiC environmnet file update_sonic_environment() @@ -1535,6 +1530,11 @@ def load_minigraph(db, no_service_restart): # generate QoS and Buffer configs clicommon.run_command("config qos reload --no-dynamic-buffer", display_cmd=True) + # get the device type + device_type = _get_device_type() + if device_type != 'MgmtToRRouter' and device_type != 'MgmtTsToR' and device_type != 'EPMS': + clicommon.run_command("pfcwd start_default", display_cmd=True) + # Write latest db version string into db db_migrator='/usr/local/bin/db_migrator.py' if os.path.isfile(db_migrator) and os.access(db_migrator, os.X_OK): diff --git a/tests/config_test.py b/tests/config_test.py index 9ea891687e27..28cea8c519b2 100644 --- a/tests/config_test.py +++ b/tests/config_test.py @@ -21,8 +21,8 @@ load_minigraph_command_output="""\ Stopping SONiC target ... Running command: /usr/local/bin/sonic-cfggen -H -m --write-to-db -Running command: pfcwd start_default Running command: config qos reload --no-dynamic-buffer +Running command: pfcwd start_default Restarting SONiC target ... Reloading Monit configuration ... Please note setting loaded from minigraph will be lost after system reboot. To preserve setting, run `config save`.