Skip to content

Commit

Permalink
preserve old order for config reload (sonic-net#1964)
Browse files Browse the repository at this point in the history
What I did
Fixes sonic-net#9473

How I did it
Preserve the old order of the config reload

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
  • Loading branch information
arlakshm authored Dec 9, 2021
1 parent f08c81d commit 96143ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,15 +1421,17 @@ def reload(db, filename, yes, load_sysinfo, no_service_restart, disable_arp_cach
# or by default DEFAULT_CONFIG_DB_FILE. In the case of database service running in namespace,
# the default config_db<namespaceID>.json format is used.


config_gen_opts = ""

if os.path.isfile(INIT_CFG_FILE):
config_gen_opts += " -j {} ".format(INIT_CFG_FILE)

if file_format == 'config_db':
config_gen_opts += ' -j {} '.format(file)
else:
config_gen_opts += ' -Y {} '.format(file)

if os.path.isfile(INIT_CFG_FILE):
config_gen_opts += " -j {} ".format(INIT_CFG_FILE)

if namespace is not None:
config_gen_opts += " -n {} ".format(namespace)

Expand Down

0 comments on commit 96143ee

Please sign in to comment.