-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[multi-asic][202305]: 'config reload -l <>' option loads incorrect config #18431
Comments
Hi @abdosi , @vperumal , @rajendrat for your viz |
@qiluo-msft would you check why the host has populated port data from other namespace? @mlok-nokia can you create a separate git issue for chassis community and point to this? |
This issue has been reported by in the chassis community -- #18286 |
Hi @judyjoseph , the issue was introduced in your PR sonic-net/sonic-utilities#877 |
I have a PR to fix this, #18452 |
…18452) Fixes: #18431 #### Why I did it sonic-cfggen misses handling for namespace at couple of locations. Due to this, when port config is fetched, it returns data from global config and not the namespace. The function calls for get_path_to_port_config_file get_port_config needs to be fixed to handle namespace for multi-asic. #### How I did it 1.Pass asic_id as argument when calling get_path_to_port_config_file() For single asic, asic_id is None and the function returns the correct port_config.ini file path. For multi-asic, using asic_id provides the correct file path for the asic. 2. Pass asic_name as argument when calling get_port_config() #### How to verify it sonic-cfggen -H --print -n -k This command should return the correct port config for the namespace.
…#18452) Fixes: sonic-net/sonic-buildimage#18431 #### Why I did it sonic-cfggen misses handling for namespace at couple of locations. Due to this, when port config is fetched, it returns data from global config and not the namespace. The function calls for get_path_to_port_config_file get_port_config needs to be fixed to handle namespace for multi-asic. #### How I did it 1.Pass asic_id as argument when calling get_path_to_port_config_file() For single asic, asic_id is None and the function returns the correct port_config.ini file path. For multi-asic, using asic_id provides the correct file path for the asic. 2. Pass asic_name as argument when calling get_port_config() #### How to verify it sonic-cfggen -H --print -n -k This command should return the correct port config for the namespace.
Description
On multi-asic system, I see that when we run config reload with -l, it creates additional ports with alias as interface names.
root@sfd-vt2-lc0:/home/cisco# show int st -d all -n asic0
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
This affects the sonic-mgmt recovery and other test cases which use config reload with running_golden_config option.
Root Cause:
sonic-cfggen misses handling for namespace at couple of locations. Due to which when port config is fetched, it returns data from global config and not the namespace.
The function calls at https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-config-engine/sonic-cfggen#L361C1-L364C84
get_path_to_port_config_file
get_port_config
needs to be fixed to handle namespace
it should be
Steps to reproduce the issue:
Describe the results you received:
Additional ports were created with 'alias' as interface names.
Describe the results you expected:
Duplicate port entries with alias names should not be created
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: