[multi-asic]: Add function to load database config #4112
Merged
SuvarnaMeenakshi merged 4 commits intosonic-net:masterfrom Sep 1, 2021
Merged
[multi-asic]: Add function to load database config #4112SuvarnaMeenakshi merged 4 commits intosonic-net:masterfrom
SuvarnaMeenakshi merged 4 commits intosonic-net:masterfrom
Conversation
on single asic or multi-asic platform. Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
functions that connect to db. Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
arlakshm
reviewed
Aug 31, 2021
ansible/library/lag_facts.py
Outdated
| else: | ||
| for po in out.split(): | ||
| # load db config | ||
| load_db_config() |
Contributor
There was a problem hiding this comment.
can we do load_db_config just once in the beginning, iso doing for every portchannel or every NS?
Contributor
Author
There was a problem hiding this comment.
Fixed as suggested.
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Contributor
|
/Azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
arlakshm
approved these changes
Aug 31, 2021
4 tasks
vmittal-msft
pushed a commit
to vmittal-msft/sonic-mgmt
that referenced
this pull request
Sep 28, 2021
What is the motivation for this PR? With the changes in sonic-net/sonic-buildimage#8173, the applications that connect to namespace dbs have to load global database configuration. Due to this change, the sonic-py-common.multi_asic functions that connect to database will fail if database configuration is not loaded in ansible library functions. How did you do it? Add a new module_utility library function to load the right db configuration based on single or multi-asic platform. Invoke this function in port_util and lag_facts where mutli_asic library function is invoked which connects to db. How did you verify/test it? Bring up a multi-asic VS testbed. ./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k ceos add-topo vms-kvm-four-asic-t1-lag password.txt Before adding this change, failure seen while running test_bgp_fact.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
With the changes in sonic-net/sonic-buildimage#8173, the applications that connect to namespace dbs have to load global database configuration. Due to this change, the sonic-py-common.multi_asic functions that connect to database will fail if database configuration is not loaded in ansible library functions.
How did you do it?
Add a new module_utility library function to load the right db configuration based on single or multi-asic platform.
Invoke this function in port_util and lag_facts where mutli_asic library function is invoked which connects to db.
How did you verify/test it?
Bring up a multi-asic VS testbed.
./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k ceos add-topo vms-kvm-four-asic-t1-lag password.txt
Before adding this change, failure seen while running test_bgp_fact.py
After fix:
=== Running tests individually ===
Tested the same with 201911 VS image to ensure that changes do not impact test cases running on 201911 image.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation