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

[show][techsupport][multi-ASIC] Add support to collect tech support on multi ASIC platform #1193

Merged
merged 5 commits into from
Nov 9, 2020

Conversation

smaheshm
Copy link
Contributor

@smaheshm smaheshm commented Oct 26, 2020

- What I did
Add support to collect tech support on multi ASIC platform

Refactored code to put together related commands in a function.

- How I did it
Modified generate_dump script to run relevant commands on all namespaces for multi ASIC platform. On single ASIC the commands are run in default (host) namesapce.

- How to verify it

Manual verification, and pytest.

samaddik@str-serv-acs-14:/var/sonic-mgmt/tests$ pytest show_techsupport/test_techsupport.py --testbed=vms12-t1-lag-1 ....
========= 2 passed in 7049.32 seconds ======


For 2 ASIC output (ASIC hardcoded to 2):

admin@str2-nswitch-acs-4:/var/dump/sonic_dump_str2-nswitch-acs-4_20201105_015555/dump$ ls
APPL_DB.json                             ip.bgp.neighbor.fc00::2.rcv1
APPL_DB.json.1                           ip.bgp.neighbor.fc00::6.adv1
APPL_DB.json.2                           ip.bgp.neighbor.fc00::6.rcv1
ASIC_DB.json                             ip.bgp.neighbor.fc00::a.adv2
ASIC_DB.json.1                           ip.bgp.neighbor.fc00::a.rcv2
ASIC_DB.json.2                           ip.bgp.neighbor.fc00::e.adv2
bgp.ipv6.neighbors.1                     ip.bgp.neighbor.fc00::e.rcv2
bgp.ipv6.neighbors.2                     ip.link
bgp.ipv6.summary.1                       ip.link.1
bgp.ipv6.summary.2                       ip.link.2
bgp.ipv6.table.1                         ip.neigh
bgp.ipv6.table.2                         ip.neigh.1
bgp.neighbors.1                          ip.neigh.2
bgp.neighbors.2                          ip.route
bgp.summary.1                            ip.route.1
bgp.summary.2                            ip.route.2
bgp.table.1                              ip.rule
bgp.table.2                              ip.rule.1
broadcom.knet.debug                      ip.rule.2
broadcom.knet.dma                        ipv6.bgp.neighbor.2603:10e2:400:1::1.adv1
broadcom.knet.dstats                     ipv6.bgp.neighbor.2603:10e2:400:1::1.rcv1
broadcom.knet.link                       ipv6.bgp.neighbor.2603:10e2:400:1::5.adv1
broadcom.knet.rate                       ipv6.bgp.neighbor.2603:10e2:400:1::5.rcv1
broadcom.knet.stats                      ipv6.bgp.neighbor.2603:10e2:400:1::9.adv2
broadcom.nat.egress                      ipv6.bgp.neighbor.2603:10e2:400:1::9.rcv2
broadcom.nat.ingress                     ipv6.bgp.neighbor.2603:10e2:400:1::d.adv2
broadcom.ps                              ipv6.bgp.neighbor.2603:10e2:400:1::d.rcv2
broadcom.soc                             ipv6.bgp.neighbor.fc00::2.adv1
broadcom.version                         ipv6.bgp.neighbor.fc00::2.rcv1
CONFIG_DB.json                           ipv6.bgp.neighbor.fc00::6.adv1
CONFIG_DB.json.1                         ipv6.bgp.neighbor.fc00::6.rcv1
CONFIG_DB.json.2                         ipv6.bgp.neighbor.fc00::a.adv2
COUNTERS_DB.json                         ipv6.bgp.neighbor.fc00::a.rcv2
COUNTERS_DB.json.1                       ipv6.bgp.neighbor.fc00::e.adv2
COUNTERS_DB.json.2                       ipv6.bgp.neighbor.fc00::e.rcv2
df                                       lldpctl

admin@str2-nswitch-acs-4:/var/dump/sonic_dump_str2-nswitch-acs-4_20201105_015555/dump$ head -n 10 ip.neigh.1
10.0.0.13 dev PortChannel0011 lladdr 52:54:00:59:42:aa REACHABLE
240.127.1.1 dev eth0 lladdr 02:42:e9:5b:4f:b0 REACHABLE
10.1.0.6 dev PortChannel4004 lladdr 02:42:f0:7f:01:05 STALE
10.0.0.9 dev PortChannel0008 lladdr 52:54:00:ce:64:93 REACHABLE
10.1.0.4 dev PortChannel4003 lladdr 02:42:f0:7f:01:07 STALE
fe80::9a03:9bff:fe03:2289 dev PortChannel0011 lladdr 98:03:9b:03:22:89 STALE
fe80::9a03:9bff:fe03:2289 dev PortChannel0008 lladdr 98:03:9b:03:22:89 STALE
fc00::a dev PortChannel0008 lladdr 52:54:00:ce:64:93 REACHABLE
2603:10e2:400:1::d dev PortChannel4004 lladdr 02:42:f0:7f:01:05 STALE
fe80::5054:ff:fe59:42aa dev PortChannel0011 lladdr 52:54:00:59:42:aa router STALE

admin@str2-nswitch-acs-4:/var/dump/sonic_dump_str2-nswitch-acs-4_20201105_015555/dump$ head -n 10 ip.neigh.2
10.0.0.39 dev PortChannel0006 lladdr 52:54:00:74:7e:25 REACHABLE
10.0.0.43 dev PortChannel0009 lladdr 52:54:00:c9:2a:65 REACHABLE
10.0.0.45 dev PortChannel0010 lladdr 52:54:00:28:88:af REACHABLE
10.0.0.49 dev PortChannel0013 lladdr 52:54:00:da:b6:77 REACHABLE
10.1.0.10 dev PortChannel4006 lladdr 02:42:f0:7f:01:05 STALE
10.0.0.41 dev PortChannel0007 lladdr 52:54:00:e9:3c:9f REACHABLE
10.0.0.33 dev PortChannel0001 lladdr 52:54:00:ff:ff:06 REACHABLE
10.1.0.8 dev PortChannel4005 lladdr 02:42:f0:7f:01:07 STALE
10.0.0.47 dev PortChannel0012 lladdr 52:54:00:4c:c3:4c REACHABLE
10.0.0.35 dev PortChannel0003 lladdr 52:54:00:6e:90:69 REACHABLE

admin@str2-nswitch-acs-4:/var/dump/sonic_dump_str2-nswitch-acs-4_20201105_015555/dump$ head -n 10 CONFIG_DB.json.2
{
  "ACL_TABLE|DATAACL": {
    "type": "hash",
    "value": {
      "policy_desc": "DATAACL",
      "ports@": "PortChannel0001,PortChannel0003,PortChannel0004,PortChannel0006,PortChannel0007,PortChannel0009,PortChannel0010,PortChannel0012,PortChannel0013,PortChannel0014",
      "stage": "ingress",
      "type": "L3"
    }
  },


- 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)

@smaheshm
Copy link
Contributor Author

@abdosi Can you check if any of the commands need to be run on all namespaces. I see 'lldpctl', it doesn't seem to have the option of running on all namespaces. 'sudo ip netns .... ' gives the same output.

scripts/generate_dump Outdated Show resolved Hide resolved
scripts/generate_dump Outdated Show resolved Hide resolved
scripts/generate_dump Outdated Show resolved Hide resolved
@smaheshm smaheshm requested review from SuvarnaMeenakshi and jleveque and removed request for qiluo-msft October 28, 2020 20:26
@smaheshm
Copy link
Contributor Author

smaheshm commented Nov 2, 2020

🔔

scripts/generate_dump Outdated Show resolved Hide resolved
scripts/generate_dump Outdated Show resolved Hide resolved
scripts/generate_dump Outdated Show resolved Hide resolved
@smaheshm smaheshm requested review from qiluo-msft and removed request for jleveque November 5, 2020 16:39
@rlhui
Copy link
Contributor

rlhui commented Nov 7, 2020

retest this please

1 similar comment
@smaheshm
Copy link
Contributor Author

smaheshm commented Nov 9, 2020

retest this please

Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

LGTM. Suggest also ask @jleveque to review.

@smaheshm smaheshm merged commit 12e1a0f into sonic-net:master Nov 9, 2020
Copy link
Contributor

@abdosi abdosi left a comment

Choose a reason for hiding this comment

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

Forgot to submit comment so they remain in pending state.

###############################################################################
collect_broadcom() {
save_cmd "bcmcmd -t5 version" "broadcom.version"
save_cmd "bcmcmd -t5 soc" "broadcom.soc"
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to get this for each asic ? bcmcmd -n <asic_instance>

Copy link
Contributor

Choose a reason for hiding this comment

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

@smaheshm any update on this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I can add this in my next PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

@smaheshm can we fix this before taking in 201911 and this change for multi-asic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its coming in #1249

scripts/generate_dump Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants