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

[DPB]config load_minigraph initializes all ports admin status to up when using platform.json #8697

Closed
dgsudharsan opened this issue Sep 7, 2021 · 0 comments · Fixed by #8711

Comments

@dgsudharsan
Copy link
Collaborator

Description

config load_minigraph initializes all ports admin status to up when using platform.json.
The update minigraph has logic to initialize only the ports whose neighbors are defined (https://github.com/Azure/sonic-buildimage/blob/202106/src/sonic-config-engine/minigraph.py#L1486)
or those belonging to portchannel (https://github.com/Azure/sonic-buildimage/blob/202106/src/sonic-config-engine/minigraph.py#L1481) to have admin status 'up' and rest left to default ('down')

However, the change introduced #3909 to have default admin status to be 'up' in portconfig.py.

This will lead to sanity check failure in sonic-mgmt and thus no test cases could be run

https://github.com/Azure/sonic-mgmt/blob/master/tests/common/plugins/sanity_check/checks.py#L140

Steps to reproduce the issue:

  1. config load_minigraph with interfaces that don't have neighbors or part of portchannels
  2. show interface status

Describe the results you received:

All ports are shown admin up.

Describe the results you expected:

Only the ports that have neighbors and are part of portchannels should be admin up. Rest should be admin down.

Output of show version:

SONiC Software Version: SONiC.202106.13-1ca6dc996_Internal
Distribution: Debian 10.10
Kernel: 4.19.0-12-2-amd64
Build commit: 1ca6dc996
Build date: Fri Sep  3 10:20:50 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci02-243

Platform: x86_64-mlnx_msn2410-r0
HwSKU: ACS-MSN2410
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1848K10624
Model Number: MSN2410-CB2FO
Hardware Revision: A2
Uptime: 20:58:52 up  1:42,  1 user,  load average: 1.02, 0.91, 1.40

Docker images:
REPOSITORY                    TAG                            IMAGE ID            SIZE
docker-dhcp-relay             latest                         4557bcf13ea8        420MB
docker-syncd-mlnx             202106.13-1ca6dc996_Internal   3f50ccea3520        991MB
docker-syncd-mlnx             latest                         3f50ccea3520        991MB
docker-snmp                   202106.13-1ca6dc996_Internal   5f13e84da4e9        455MB
docker-snmp                   latest                         5f13e84da4e9        455MB
docker-teamd                  202106.13-1ca6dc996_Internal   f8cf8abfc9be        425MB
docker-teamd                  latest                         f8cf8abfc9be        425MB
docker-nat                    202106.13-1ca6dc996_Internal   2c7f2206b717        428MB
docker-nat                    latest                         2c7f2206b717        428MB
docker-sonic-mgmt-framework   202106.13-1ca6dc996_Internal   c68ca9909360        570MB
docker-sonic-mgmt-framework   latest                         c68ca9909360        570MB
docker-router-advertiser      202106.13-1ca6dc996_Internal   fb6ab0e07fe8        413MB
docker-router-advertiser      latest                         fb6ab0e07fe8        413MB
docker-platform-monitor       202106.13-1ca6dc996_Internal   c652c5d66817        741MB
docker-platform-monitor       latest                         c652c5d66817        741MB
docker-lldp                   202106.13-1ca6dc996_Internal   53bc4487f1ea        453MB
docker-lldp                   latest                         53bc4487f1ea        453MB
docker-database               202106.13-1ca6dc996_Internal   14a1f8363148        413MB
docker-database               latest                         14a1f8363148        413MB
docker-orchagent              202106.13-1ca6dc996_Internal   940ab57c6839        443MB
docker-orchagent              latest                         940ab57c6839        443MB
docker-macsec                 202106.13-1ca6dc996_Internal   df73eb9604ba        428MB
docker-macsec                 latest                         df73eb9604ba        428MB
docker-sonic-telemetry        202106.13-1ca6dc996_Internal   0b33d5088e0b        502MB
docker-sonic-telemetry        latest                         0b33d5088e0b        502MB
docker-fpm-frr                202106.13-1ca6dc996_Internal   f68dbd0a2c4d        443MB
docker-fpm-frr                latest                         f68dbd0a2c4d        443MB
docker-sflow                  202106.13-1ca6dc996_Internal   77059329fb00        426MB
docker-sflow                  latest                         77059329fb00        426MB

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

lguohan pushed a commit that referenced this issue Sep 13, 2021
…oading minigraph (#8711)

To Fix #8697 . The config load_minigraph initializes 'admin_status' to up when platform.json has DPB configs. This doesn't happen when using port_config.ini
The update minigraph has logic to initialize only the ports whose neighbors are defined or those belonging to portchannel
However, a change was introduced to have default admin status to be 'up' in portconfig.py when the minigraph was using platform.json

This will lead to sanity check failure in sonic-mgmt and thus no test cases could be run
judyjoseph pushed a commit that referenced this issue Sep 14, 2021
…oading minigraph (#8711)

To Fix #8697 . The config load_minigraph initializes 'admin_status' to up when platform.json has DPB configs. This doesn't happen when using port_config.ini
The update minigraph has logic to initialize only the ports whose neighbors are defined or those belonging to portchannel
However, a change was introduced to have default admin status to be 'up' in portconfig.py when the minigraph was using platform.json

This will lead to sanity check failure in sonic-mgmt and thus no test cases could be run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant