[config]Improve config save cli to save to one file for multiasic#3288
[config]Improve config save cli to save to one file for multiasic#3288qiluo-msft merged 8 commits intosonic-net:masterfrom
Conversation
|
Do you have a HLD PR to link? Since this is a new feature, people need to read HLD to understand your big picture and goals in each code PR. #Closed |
|
/EasyCLA |
How about save all configurations to /etc/sonic too? Also, could we change reload from a single file in same PR which has consistent logic for save and reload? Refers to: config/main.py:1271 in a30ce28. [](commit_id = a30ce28, deletion_comment = False) |
Will submit a HLD PR for this. |
Hi @xincunli-sonic , what do you mean save all configuration to /etc/sonic. If we didn't specify the path, it will save default config_db.json, config_db0.json... to /etc/sonic. config reload in single file is much more complex than config save. I prefer to split PR for this. |
wenyiz2021
left a comment
There was a problem hiding this comment.
in this case for multi-asic, when single file name is provided to do config save, we are saving to 1 single file:
in this single file, do we have duplicate content from both host and asics?
what is the consequences of overwriting all config in one file? should we prevent this behavior
…nic-net#3288) HLD design : sonic-net/SONiC#1684 #### What I did Add support for config save to one file for multi-aisc. #### How I did it Extend support for one file save for multiasic using the below format: ``` { "localhost": {/*host config*/}, "asic0": {/*asic0 config*/}, ... "asicN": {/*asicN config*/} } ``` #### How to verify it Unit test and manual test on multiasic platform. Example running multi: ``` admin@str2-8800-sup-2:~$ sudo config save -y tmp.json Integrate each ASIC's config into a single JSON file tmp.json. admin@str2-8800-sup-2:~$ cat tmp.json |more { "localhost": { "ACL_TABLE": { "NTP_ACL": { "policy_desc": "NTP_ACL", "services": [ "NTP" ... "asic0": { "AUTO_TECHSUPPORT": { "GLOBAL": { "available_mem_threshold": "10.0", ```
…nic-net#3288) HLD design : sonic-net/SONiC#1684 #### What I did Add support for config save to one file for multi-aisc. #### How I did it Extend support for one file save for multiasic using the below format: ``` { "localhost": {/*host config*/}, "asic0": {/*asic0 config*/}, ... "asicN": {/*asicN config*/} } ``` #### How to verify it Unit test and manual test on multiasic platform. Example running multi: ``` admin@str2-8800-sup-2:~$ sudo config save -y tmp.json Integrate each ASIC's config into a single JSON file tmp.json. admin@str2-8800-sup-2:~$ cat tmp.json |more { "localhost": { "ACL_TABLE": { "NTP_ACL": { "policy_desc": "NTP_ACL", "services": [ "NTP" ... "asic0": { "AUTO_TECHSUPPORT": { "GLOBAL": { "available_mem_threshold": "10.0", ```
HLD design : sonic-net/SONiC#1684
ADO: 27595294
What I did
Add support for config save to one file for multi-aisc.
How I did it
Extend support for one file save for multiasic using the below format:
How to verify it
Unit test and manual test on multiasic platform.
Example running multi:
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)