-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[config]Improve config save cli to save to one file for multiasic #3288
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor comment on function name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…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)