[action] [PR:15315] [chassis]: Add all running_golden_config files for multi-asics based on num_asic#15320
Merged
mssonicbld merged 1 commit intosonic-net:202405from Nov 1, 2024
Conversation
…sonic-net#15315) Signed-off-by: anamehra anamehra@cisco.com Description of PR Fixes config reload -y <running_golden_config> for chassis sup by using num_asics to populate config db file list Summary: Fixes # (issue) Approach What is the motivation for this PR? During some tests, config is restored via config reload using runnin_golden config files. config reload -y expects all n+1 config files be provided as input but sonic-mgmt script only includes the config files for present asics. System had 10 asics but max asics could be 16. The command shows only 10+1(global) config db Before fix: tc/sonic/running_golden_config0.json,/etc/sonic/running_golden_config1.json,/etc/sonic/running_golden_config4.json,/etc/sonic/running_golden_config5.json,/etc/sonic/running_golden_config8.json,/etc/soo nic/running_golden_config9.json,/etc/sonic/running_golden_config10.json,/etc/sonic/running_golden_config11.json,/etc/sonic/running_golden_config12.json,/etc/sonic/running_golden_config13.json &>/dev/nn ull _uses_shell=True warn=False stdin_add_newline=True strip_empty_ends=True argv=None chdir=None creates=None removes=None stdin=None How did you do it? Use num_asics for the DUT host and populate the CLI args list with running_golden_config db file path for each possible asic, present or absent. How did you verify/test it? RUn sonic-mgmt tests suits After fix: Config reload on RP with max 16 asics, 10 resent: 2024 Oct 30 20:45:56.831628 sfd-t2-sup INFO python[3758349]: ansible-ansible.legacy.command Invoked with executable=/bin/bash _raw_params=config reload -y -f -l /etc/sonic/running_golden_config.json,// etc/sonic/running_golden_config0.json,/etc/sonic/running_golden_config1.json,/etc/sonic/running_golden_config2.json,/etc/sonic/running_golden_config3.json,/etc/sonic/running_golden_config4.json,/etc/ss onic/running_golden_config5.json,/etc/sonic/running_golden_config6.json,/etc/sonic/running_golden_config7.json,/etc/sonic/running_golden_config8.json,/etc/sonic/running_golden_config9.json,/etc/sonic// running_golden_config10.json,/etc/sonic/running_golden_config11.json,/etc/sonic/running_golden_config12.json,/etc/sonic/running_golden_config13.json,/etc/sonic/running_golden_config14.json,/etc/sonic// running_golden_config15.json &>/dev/null _uses_shell=True warn=False stdin_add_newline=True strip_empty_ends=True argv=None chdir=None creates=None removes=None stdin=None 2024 Oct 30 20:46:01.770294 sfd-t2-sup NOTICE CCmisApi: 'reload' executing with command: config reload -y -f -l /etc/sonic/running_golden_config.json,/etc/sonic/running_golden_config0.json,/etc/sonic// running_golden_config1.json,/etc/sonic/running_golden_config2.json,/etc/sonic/running_golden_config3.json,/etc/sonic/running_golden_config4.json,/etc/sonic/running_golden_config5.json,/etc/sonic/runnii ng_golden_config6.json,/etc/sonic/running_golden_config7.json,/etc/sonic/running_golden_config8.json,/etc/sonic/running_golden_config9.json,/etc/sonic/running_golden_config10.json,/etc/sonic/running_gg olden_config11.json,/etc/sonic/running_golden_config12.json,/etc/sonic/running_golden_config13.json,/etc/sonic/running_golden_config14.json,/etc/sonic/running_golden_config15.json Config reload on LC with 3 asics: 2024 Oct 30 20:45:53.282867 sfd-t2-lc0 INFO python[86920]: ansible-ansible.legacy.command Invoked with executable=/bin/bash _raw_params=config reload -y -f -l /etc/sonic/running_golden_confii g.json,/etc/sonic/running_golden_config0.json,/etc/sonic/running_golden_config1.json,/etc/sonic/running_golden_config2.json &>/dev/null _uses_shell=True warn=False stdin_add_newline=True strr ip_empty_ends=True argv=None chdir=None creates=None removes=None stdin=None 2024 Oct 30 20:45:54.919206 sfd-t2-lc0 NOTICE CCmisApi: 'reload' executing with command: config reload -y -f -l /etc/sonic/running_golden_config.json,/etc/sonic/running_golden_config0.json,// etc/sonic/running_golden_config1.json,/etc/sonic/running_golden_config2.json 2024 Oct 30 20:45:54.919305 sfd-t2-lc0 NOTICE CCmisApi: 'reload' stopping services... Any platform specific information? Chassis Supervisor Signed-off-by: anamehra anamehra@cisco.com
8 tasks
Collaborator
Author
|
Original PR: #15315 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: anamehra anamehra@cisco.com
Description of PR
Fixes config reload -y <running_golden_config> for chassis sup by using num_asics to populate config db file list
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
During some tests, config is restored via config reload using runnin_golden config files.
config reload -y expects all n+1 config files be provided as input but sonic-mgmt script only includes the config files for present asics.
System had 10 asics but max asics could be 16. The command shows only 10+1(global) config db
Before fix:
How did you do it?
Use num_asics for the DUT host and populate the CLI args list with running_golden_config db file path for each possible asic, present or absent.
How did you verify/test it?
RUn sonic-mgmt tests suits
After fix:
Config reload on RP with max 16 asics, 10 resent:
Config reload on LC with 3 asics:
Any platform specific information?
Chassis Supervisor
Supported testbed topology if it's a new test case?
Documentation