Set key "asic0" in single-asic scenerio to keep consistent with multi-asic in function core_dump_and_config_check.#8884
Conversation
…ic. (sonic-net#8884) What is the motivation for this PR? In PR (sonic-net#6527), it enhanced function core_dump_and_config_check to be multi-asic aware. But in single-asic scenerio, it simply set the key None, which does not make scene. In this PR, I reset the key "asic0" in single-asic scenerio to keep consistent with the key value of multi-asic scenerio. How did you do it? Change the key in single-asic scenerio from None to asic0.
|
Cherry-pick PR to 202205: #8885 |
|
@yutongzhang-microsoft PR conflicts with 202012 branch |
…ic. (#8884) What is the motivation for this PR? In PR (#6527), it enhanced function core_dump_and_config_check to be multi-asic aware. But in single-asic scenerio, it simply set the key None, which does not make scene. In this PR, I reset the key "asic0" in single-asic scenerio to keep consistent with the key value of multi-asic scenerio. How did you do it? Change the key in single-asic scenerio from None to asic0.
|
Hi @yutongzhang-microsoft, this PR is causing mulitple test failures on multi-asic platform and chassis. In this PR the config_db of host is getting overwritten with config_db of asic0. Please check and see if this can be fixed quickly |
|
@yutongzhang-microsoft , single-asic may not mean we can use asic[0] |
|
@rlhui Asked @yutongzhang-microsoft to check. |
|
Hi, @arlakshm @rlhui I don't think these failures are caused by my PR. Variable And also, as @arlakshm said, BTW, can you revert my PR locally and test? |
|
Also, as (#9051) said, the issus is only found in 202205 branch. But my PR is included in master, 202012, 202205 branch. If my PR causes this issue, I think the issue will be found not only in 202205. |
…multi-asic. (#8884)" (#9470) Reverts #8884 In PR #8884, in multi-asic scenrio ``` node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4), dest='/etc/sonic/config_db.json', verbose=False) ``` This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name. Signed-off-by: Yutong Zhang <[email protected]>
…multi-asic. (sonic-net#8884)" (sonic-net#9470) Reverts sonic-net#8884 In PR sonic-net#8884, in multi-asic scenrio ``` node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4), dest='/etc/sonic/config_db.json', verbose=False) ``` This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name. Signed-off-by: Yutong Zhang <[email protected]>
…multi-asic. (sonic-net#8884)" (sonic-net#9470) Reverts sonic-net#8884 In PR sonic-net#8884, in multi-asic scenrio ``` node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4), dest='/etc/sonic/config_db.json', verbose=False) ``` This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name. Signed-off-by: Yutong Zhang <[email protected]>
…multi-asic. (sonic-net#8884)" (sonic-net#9470) Reverts sonic-net#8884 In PR sonic-net#8884, in multi-asic scenrio ``` node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4), dest='/etc/sonic/config_db.json', verbose=False) ``` This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name. Signed-off-by: Yutong Zhang <[email protected]>
…multi-asic. (#8884)" (#9470) Reverts #8884 In PR #8884, in multi-asic scenrio ``` node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4), dest='/etc/sonic/config_db.json', verbose=False) ``` This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name. Signed-off-by: Yutong Zhang <[email protected]>
…multi-asic. (#8884)" (#9470) Reverts #8884 In PR #8884, in multi-asic scenrio ``` node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4), dest='/etc/sonic/config_db.json', verbose=False) ``` This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name. Signed-off-by: Yutong Zhang <[email protected]>
…multi-asic. (#8884)" (#9470) Reverts #8884 In PR #8884, in multi-asic scenrio ``` node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4), dest='/etc/sonic/config_db.json', verbose=False) ``` This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name. Signed-off-by: Yutong Zhang <[email protected]>
…ic. (sonic-net#8884) What is the motivation for this PR? In PR (sonic-net#6527), it enhanced function core_dump_and_config_check to be multi-asic aware. But in single-asic scenerio, it simply set the key None, which does not make scene. In this PR, I reset the key "asic0" in single-asic scenerio to keep consistent with the key value of multi-asic scenerio. How did you do it? Change the key in single-asic scenerio from None to asic0.
…multi-asic. (sonic-net#8884)" (sonic-net#9470) Reverts sonic-net#8884 In PR sonic-net#8884, in multi-asic scenrio ``` node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4), dest='/etc/sonic/config_db.json', verbose=False) ``` This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name. Signed-off-by: Yutong Zhang <[email protected]>
Description of PR
In PR (#6527), it enhanced function
core_dump_and_config_checkto be multi-asic aware. But in single-asic scenerio, it simply set the key None, which does not make scene. In this PR, I reset the key "asic0" in single-asic scenerio to keep consistent with the key value of multi-asic scenerio.Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
In PR (#6527), it enhanced function
core_dump_and_config_checkto be multi-asic aware. But in single-asic scenerio, it simply set the key None, which does not make scene. In this PR, I reset the key "asic0" in single-asic scenerio to keep consistent with the key value of multi-asic scenerio.How did you do it?
Change the key in single-asic scenerio from
Nonetoasic0.How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation