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

config load_minigraph broken on Mellanox-SN2700-D40C8S8 #8938

Closed
qiluo-msft opened this issue Oct 11, 2021 · 1 comment
Closed

config load_minigraph broken on Mellanox-SN2700-D40C8S8 #8938

qiluo-msft opened this issue Oct 11, 2021 · 1 comment

Comments

@qiluo-msft
Copy link
Collaborator

Description

Steps to reproduce the issue:

  1. Install a recent built master image https://dev.azure.com/mssonic/build/_build/results?buildId=42496&view=results
  2. run command lines as below
admin@str-msn2700-20:~$ show ver
SONiC Software Version: SONiC.master.42496-32e73b087
Distribution: Debian 10.11
Kernel: 4.19.0-12-2-amd64
Build commit: 32e73b087
Build date: Sat Oct  9 23:17:38 UTC 2021
Built by: AzDevOps@sonic-build-workers-000S2B

Platform: x86_64-mlnx_msn2700-r0
HwSKU: Mellanox-SN2700-D40C8S8
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2028X35361
Model Number: MSN2700-CS2FO
Hardware Revision: A2
Uptime: 04:01:49 up 11 min,  1 user,  load average: 1.32, 1.58, 1.16
Docker images:
REPOSITORY                    TAG                      IMAGE ID            SIZE
docker-syncd-mlnx             latest                   d038b3eacc97        1.03GB
docker-syncd-mlnx             master.42496-32e73b087   d038b3eacc97        1.03GB
docker-platform-monitor       latest                   72624a3c1ba5        744MB
docker-platform-monitor       master.42496-32e73b087   72624a3c1ba5        744MB
docker-snmp                   latest                   387e5d702b49        490MB
docker-snmp                   master.42496-32e73b087   387e5d702b49        490MB
docker-teamd                  latest                   3760974089f8        460MB
docker-teamd                  master.42496-32e73b087   3760974089f8        460MB
docker-nat                    latest                   f3619e7f5882        429MB
docker-nat                    master.42496-32e73b087   f3619e7f5882        429MB
docker-macsec                 latest                   aa6fdf9503b4        429MB
docker-macsec                 master.42496-32e73b087   aa6fdf9503b4        429MB
docker-lldp                   latest                   d752e8f13fc5        454MB
docker-lldp                   master.42496-32e73b087   d752e8f13fc5        454MB
docker-database               latest                   e2e105c1840c        414MB
docker-database               master.42496-32e73b087   e2e105c1840c        414MB
docker-orchagent              latest                   ebc0cd9d5d47        444MB
docker-orchagent              master.42496-32e73b087   ebc0cd9d5d47        444MB
docker-sonic-telemetry        latest                   fdb625d5c09b        502MB
docker-sonic-telemetry        master.42496-32e73b087   fdb625d5c09b        502MB
docker-sonic-mgmt-framework   latest                   5025d2cd1cb1        569MB
docker-sonic-mgmt-framework   master.42496-32e73b087   5025d2cd1cb1        569MB
docker-sflow                  latest                   3d3966b4486f        427MB
docker-sflow                  master.42496-32e73b087   3d3966b4486f        427MB
docker-router-advertiser      latest                   9fe0610a40a0        414MB
docker-router-advertiser      master.42496-32e73b087   9fe0610a40a0        414MB
docker-fpm-frr                latest                   c69f55bb7cf5        449MB
docker-fpm-frr                master.42496-32e73b087   c69f55bb7cf5        449MB
docker-dhcp-relay             latest                   dcc6a4594dcd        427MB

admin@str-msn2700-20:~$ sudo config load_minigraph
Reload config from minigraph? [y/N]: y
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json   --write-to-db
Traceback (most recent call last):
  File "/usr/local/bin/sonic-cfggen", line 441, in <module>
    main()
  File "/usr/local/bin/sonic-cfggen", line 335, in main
    deep_update(data, parse_xml(minigraph, platform, asic_name=asic_name))
  File "/usr/local/lib/python3.7/dist-packages/minigraph.py", line 1221, in parse_xml
    (ports, alias_map, alias_asic_map) = get_port_config(hwsku=hwsku, platform=platform, port_config_file=port_config_file, asic_name=asic_name, hwsku_config_file=hwsku_config_file)
  File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 134, in get_port_config
    return parse_platform_json_file(hwsku_json_file, port_config_file)
  File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 278, in parse_platform_json_file
    child_ports = get_child_ports(intf, brkout_mode, platform_json_file)
  File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 228, in get_child_ports
    alias_list = port_dict[INTF_KEY][interface]['breakout_modes'][breakout_mode]
KeyError: '1x10G'

admin@str-msn2700-20:~$ sonic-cfggen -H -m  --print-data
Traceback (most recent call last):
  File "/usr/local/bin/sonic-cfggen", line 441, in <module>
    main()
  File "/usr/local/bin/sonic-cfggen", line 335, in main
    deep_update(data, parse_xml(minigraph, platform, asic_name=asic_name))
  File "/usr/local/lib/python3.7/dist-packages/minigraph.py", line 1221, in parse_xml
    (ports, alias_map, alias_asic_map) = get_port_config(hwsku=hwsku, platform=platform, port_config_file=port_config_file, asic_name=asic_name, hwsku_config_file=hwsku_config_file)
  File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 134, in get_port_config
    return parse_platform_json_file(hwsku_json_file, port_config_file)
  File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 278, in parse_platform_json_file
    child_ports = get_child_ports(intf, brkout_mode, platform_json_file)
  File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 228, in get_child_ports
    alias_list = port_dict[INTF_KEY][interface]['breakout_modes'][breakout_mode]
KeyError: '1x10G'

Describe the results you received:

Describe the results you expected:

Output of show version:

master.42496-32e73b087

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

qiluo-msft pushed a commit that referenced this issue Oct 13, 2021
#### Why I did it
Fixing #8938
Fixing 1x10G DPB mode in Mellanox-SN2700-D40C8S8 SKU as it was causing sonic-cfggen to fail.


#### How I did it
Added correct mode format in hwksu.json in Mellanox-SN2700-D40C8S8  and updated platform.json for the new mode.


#### How to verify it
Using sonic-cfggen verify it works fine
@qiluo-msft
Copy link
Collaborator Author

It is fixed by #8953

judyjoseph pushed a commit that referenced this issue Oct 14, 2021
#### Why I did it
Fixing #8938
Fixing 1x10G DPB mode in Mellanox-SN2700-D40C8S8 SKU as it was causing sonic-cfggen to fail.


#### How I did it
Added correct mode format in hwksu.json in Mellanox-SN2700-D40C8S8  and updated platform.json for the new mode.


#### How to verify it
Using sonic-cfggen verify it works fine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant