Description
The Issue is related to PR https://github.com/sonic-net/sonic-mgmt/pull/8884,
The Particular PR replaces the indexing from None to 'ASIC0' irrespective of type of dut(Multi-asci, single asic).
Currently the variable duts_data[duthost.hostname]["pre_running_config"]["asic0"] stores the config_db.json.
This Creates a issue in a multi asic Environment, As in multi-asic Environment the variable- duts_data[duthost.hostname]["pre_running_config"]["asic0"] is used to store configdb0.json.
The current code replaces the stored config_db.json in duts_data with config_db0.json in core_dump_and _config_check function and reloads the config_db.json with data stored for asic0 ,if comparison fails.
For a multi_asic environment config_db0.json,config_db1.json and config_db.json each holds different set of configuration.
config_db,json cannot be replaced by config_db0.json
Describe the results you received:
The Content of /etc/sonic/configdb.json get overridden by the contents of /etc/sonic/configdb0.json.
Describe the results you expected:
The Content of /etc/sonic/configdb.json are two different files with different data/etc/sonic/configdb0.json.
Description The Issue is related to PR https://github.com/sonic-net/sonic-mgmt/pull/8884, The Particular PR replaces the indexing from None to 'ASIC0' irrespective of type of dut(Multi-asci, single asic).
Currently the variable duts_data[duthost.hostname]["pre_running_config"]["asic0"] stores the config_db.json. This Creates a issue in a multi asic Environment, As in multi-asic Environment the variable- duts_data[duthost.hostname]["pre_running_config"]["asic0"] is used to store configdb0.json. The current code replaces the stored config_db.json in duts_data with config_db0.json in core_dump_and _config_check function and reloads the config_db.json with data stored for asic0 ,if comparison fails.
For a multi_asic environment config_db0.json,config_db1.json and config_db.json each holds different set of configuration. config_db,json cannot be replaced by config_db0.json
Describe the results you received: The Content of /etc/sonic/configdb.json get overridden by the contents of /etc/sonic/configdb0.json.
Describe the results you expected: The Content of /etc/sonic/configdb.json are two different files with different data/etc/sonic/configdb0.json.