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

[multi-asic][sonic-config-engine]: Get PORT table from namespace config db #7632

Merged
merged 8 commits into from
Jun 7, 2021

Conversation

SuvarnaMeenakshi
Copy link
Contributor

Signed-off-by: Suvarna Meenakshi [email protected]

Why I did it

portconfig.py gets PORT table from config_db if it is present. If not, port_config.ini files are parsed.
For multi-asic platform, if namespace is passed to get_port_config(), config_db connection was done to host namespace always and not to asic specific namespace.
Provides fix for: #7161

How I did it

Modify db connection function to connect to namespace config_db.

How to verify it

Bring up multi-asic VS switch:
./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k ceos add-topo vms-kvm-four-asic-t1-lag password.txt
./testbed-cli.sh -t vtestbed.csv -m veos_vtb deploy-mg vms-kvm-four-asic-t1-lag lab password.txt

Ensure that 'config load_minigraph' is successful and and config_db*.json are generated correctly.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

namespace config_dbs.

Signed-off-by: Suvarna Meenakshi <[email protected]>
if not port_config_file:
port_config_file = device_info.get_path_to_port_config_file(hwsku, asic)
port_config_file = device_info.get_path_to_port_config_file(hwsku, asic_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

how is it working 201911 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in 201911 and here, we pass "asic_id" like 0/1 to get_path_to_port_config_file() ; That part is not modified.
The change here is that, portconfig.py consumes asic_name instead of asic_id and we get asic_id from asic_name here instead of getting that information in minigraph.py

arlakshm
arlakshm previously approved these changes Jun 2, 2021
Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: Suvarna Meenakshi <[email protected]>
@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 2e305c9 into sonic-net:master Jun 7, 2021
@SuvarnaMeenakshi SuvarnaMeenakshi deleted the masic_cfggen branch June 7, 2021 19:34
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…ig db (sonic-net#7632)

Why I did it
portconfig.py gets PORT table from config_db if it is present. If not, port_config.ini files are parsed.
For multi-asic platform, if namespace is passed to get_port_config(), config_db connection was done to host namespace always and not to asic specific namespace.
Provides fix for: sonic-net#7161

How I did it
Modify db connection function to connect to namespace config_db.
@qiluo-msft
Copy link
Collaborator

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

SuvarnaMeenakshi added a commit to SuvarnaMeenakshi/sonic-buildimage that referenced this pull request Apr 6, 2022
…ig db (sonic-net#7632)

Why I did it
portconfig.py gets PORT table from config_db if it is present. If not, port_config.ini files are parsed.
For multi-asic platform, if namespace is passed to get_port_config(), config_db connection was done to host namespace always and not to asic specific namespace.
Provides fix for: sonic-net#7161

How I did it
Modify db connection function to connect to namespace config_db.

(cherry picked from commit 2e305c9)
@SuvarnaMeenakshi
Copy link
Contributor Author

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

Created new PR: #10475

SuvarnaMeenakshi added a commit that referenced this pull request May 27, 2022
…ace config db (#10475)

Why I did it
Cherry-pick of: #7632
portconfig.py gets PORT table from config_db if it is present. If not, port_config.ini files are parsed.
For multi-asic platform, if namespace is passed to get_port_config(), config_db connection was done to host namespace always and not to asic specific namespace.
Provides fix for: #7161

How I did it
Modify db connection function to connect to namespace config_db.

How to verify it
Unit-test passed.
Verified on multi-asic VS platform.
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

Successfully merging this pull request may close these issues.

5 participants