Fix the golden_Config_db generation for multi-asic#18652
Fix the golden_Config_db generation for multi-asic#18652arlakshm wants to merge 2 commits intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hi @arlakshm , we uncovered issues with this PR in recent testing. With the change in the PR, the member ports of PO in configDb was mistakenly set to asic port name In minigraph generated by sonic-mgmt, the member port name is asic port name, e.g., |
|
|
||
| return out | ||
| for asic_id in range(0, multi_asic.get_num_asics()): | ||
| rc, out, err = self.module.run_command("sonic-cfggen -H -m -j /etc/sonic/init_cfg.json --print-data -n asic{}".format(asic_id)) |
There was a problem hiding this comment.
To address the issue brought up by @ysmanman , we propose the following change here:
platform = device_info.get_platform()
ini_file = "/usr/share/sonic/device/{}/{}/{}/port_config.ini".format(platform, self.hwsku, asic_id)
rc, out, err = self.module.run_command("sonic-cfggen -H -m -j /etc/sonic/init_cfg.json --print-data -n asic{} -p {}".format(asic_id, ini_file))
There was a problem hiding this comment.
As an amendment to my previous comment, we should also check that the port_config.ini file exits (e.g. since sonic-net/sonic-buildimage#23070 removed the file on supervisors). Revised:
platform = device_info.get_platform()
cmd = "sonic-cfggen -H -m -j /etc/sonic/init_cfg.json --print-data -n asic{}".format(asic_id)
ini_file_rc, ini_out, ini_err = self.module.run_command("test -f {}".format(ini_file))
if ini_file_rc == 0:
cmd += " -p {}".format(ini_file)
rc, out, err = self.module.run_command(cmd)
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@arlakshm reminder on this |
Description of PR
Back port request
Approach
What is the motivation for this PR?
Fixes #18596
How did you do it?
Do not get the override from the running configuration. use the config generated from the minigraph instead
How did you verify/test it?
deploy-mg on multi asic platform
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation