Skip to content
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

[generate_dump] [BCM] Dump only the relevant BCM commands for fabric cards #2606

Merged
merged 2 commits into from
Apr 10, 2023
Merged

[generate_dump] [BCM] Dump only the relevant BCM commands for fabric cards #2606

merged 2 commits into from
Apr 10, 2023

Conversation

saksarav-nokia
Copy link
Contributor

Signed-off-by: Sakthivadivu Saravanaraj sakthivadivu.saravanaraj@nokia.com

What I did

When we run generate_dump script in SFM cards in a Broadcom chassis, the errors were printed in syslog for all the Broadcom commands which are not supported in fabric/Ramon cards. Added a check to dump all l2, l3, fp and tm commands only if the switch_type is non fabric card since these commands are not valid for fabric cards.

How I did it

Get the switch_type from DEVICE_METADATA and check the switch_type before dumping these BCM commands.

How to verify it

Ran generate_dump script in both voq and fabric cards, (1)verified that the fabric cards don't log the errors for the BCM commands (2) verified that the commands are dumped correctly in non-fabric dnx cards.

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)

save_bcmcmd_all_ns "\"tm lag\"" "tm.lag.summary"
save_bcmcmd_all_ns "\"pp info fec\"" "pp.fec.summary"
save_bcmcmd_all_ns "\"nif sts\"" "nif.sts.summary"
switch_type=$(sonic-cfggen -d -v "DEVICE_METADATA['localhost']['switch_type']")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this check if [ $switch_type != "fabric" ]if the supervisor has no configuration then 'show techsupport` will fail?

Instead of check for switch_type, Can we use the flag is_supervisor in the platfrom_env.conf in hwsku folder to check if the card is supervisor or linecard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. Let me check and fix this

kenneth-arista
kenneth-arista previously approved these changes Feb 6, 2023
Copy link
Contributor

@kenneth-arista kenneth-arista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me.

@jfeng-arista
Copy link
Contributor

jfeng-arista commented Feb 6, 2023

This change excludes running some commands when switchtype is fabric. and the code change looks good to me.

…cards.

Signed-off-by: Sakthivadivu Saravanaraj <sakthivadivu.saravanaraj@nokia.com>
…om platform_env.conf instead of switch_type in DEVICE_METADATA

Signed-off-by: saksarav <sakthivadivu.saravanaraj@nokia.com>
@saksarav-nokia
Copy link
Contributor Author

@arlakshm , i addressed your review comment. Please take a look at it.

@arlakshm arlakshm merged commit 04d0b34 into sonic-net:master Apr 10, 2023
yxieca pushed a commit that referenced this pull request Apr 19, 2023
…ds for fabric cards (#2606)

Signed-off-by: Sakthivadivu Saravanaraj sakthivadivu.saravanaraj@nokia.com

What I did
When we run generate_dump script in SFM cards in a Broadcom chassis, the errors were printed in syslog for all the Broadcom commands which are not supported in fabric/Ramon cards. Added a check to dump all l2, l3, fp and tm commands only if the switch_type is non fabric card since these commands are not valid for fabric cards.

How I did it
Get the switch_type from DEVICE_METADATA and check the switch_type before dumping these BCM commands.

How to verify it
Ran generate_dump script in both voq and fabric cards, (1)verified that the fabric cards don't log the errors for the BCM commands (2) verified that the commands are dumped correctly in non-fabric dnx cards.
Signed-off-by: Sakthivadivu Saravanaraj <sakthivadivu.saravanaraj@nokia.com>
Signed-off-by: saksarav <sakthivadivu.saravanaraj@nokia.com>
StormLiangMS pushed a commit that referenced this pull request Apr 26, 2023
…ds for fabric cards (#2606)

Signed-off-by: Sakthivadivu Saravanaraj sakthivadivu.saravanaraj@nokia.com

What I did
When we run generate_dump script in SFM cards in a Broadcom chassis, the errors were printed in syslog for all the Broadcom commands which are not supported in fabric/Ramon cards. Added a check to dump all l2, l3, fp and tm commands only if the switch_type is non fabric card since these commands are not valid for fabric cards.

How I did it
Get the switch_type from DEVICE_METADATA and check the switch_type before dumping these BCM commands.

How to verify it
Ran generate_dump script in both voq and fabric cards, (1)verified that the fabric cards don't log the errors for the BCM commands (2) verified that the commands are dumped correctly in non-fabric dnx cards.
Signed-off-by: Sakthivadivu Saravanaraj <sakthivadivu.saravanaraj@nokia.com>
Signed-off-by: saksarav <sakthivadivu.saravanaraj@nokia.com>
dprital added a commit to dprital/sonic-buildimage that referenced this pull request May 1, 2023
Update sonic-utilities submodule pointer to include the following:
* 600377f7 [DPB]Fixing typo in config breakout output ([sonic-net#2802](sonic-net/sonic-utilities#2802))
* 8ae2424a [config]Support multi-asic  Golden Config override ([sonic-net#2738](sonic-net/sonic-utilities#2738))
* 79003ab2 [chassis]: remote cli commands infra for sonic chassis ([sonic-net#2701](sonic-net/sonic-utilities#2701))
* cbc55eeb [voq][chassis][generate_dump] [BCM] Dump only the relevant BCM commands for fabric cards ([sonic-net#2606](sonic-net/sonic-utilities#2606))
* 39c94b7e [GCU] Prohibit removal of PFC_WD POLL_INTERVAL field ([sonic-net#2545](sonic-net/sonic-utilities#2545))

Signed-off-by: dprital <drorp@nvidia.com>
maxliu37 pushed a commit to maxliu37/SONiC that referenced this pull request May 3, 2024
Update sonic-utilities submodule pointer to include the following:
* a1057b27 [config reload]Config Reload Enhancement ([#2693](sonic-net/sonic-utilities#2693))
* 04d0b34a [voq][chassis][generate_dump] [BCM] Dump only the relevant BCM commands for fabric cards ([#2606](sonic-net/sonic-utilities#2606))

Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
maxliu37 pushed a commit to maxliu37/SONiC that referenced this pull request May 3, 2024
Update sonic-utilities submodule pointer to include the following:
* a1057b27 [config reload]Config Reload Enhancement ([#2693](sonic-net/sonic-utilities#2693))
* 04d0b34a [voq][chassis][generate_dump] [BCM] Dump only the relevant BCM commands for fabric cards ([#2606](sonic-net/sonic-utilities#2606))

Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants