Skip to content

Fix AttributeError exception seen when testing 201911 image.#4178

Merged
yxieca merged 1 commit intosonic-net:masterfrom
SuvarnaMeenakshi:load_db_fix
Sep 8, 2021
Merged

Fix AttributeError exception seen when testing 201911 image.#4178
yxieca merged 1 commit intosonic-net:masterfrom
SuvarnaMeenakshi:load_db_fix

Conversation

@SuvarnaMeenakshi
Copy link
Copy Markdown
Contributor

201911 does not require loading of database config.
Add the right exception so that the exception of load db
config can be ignored for 201911 image.

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

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

After #4112 fix to load database config, testing 201911 image causes an AttributeError:
line 68, in get_po_names\r\n File "/tmp/ansible_lag_facts_payload_eqDCQY/ansible_lag_facts_payload.zip/ansible/module_utils/multi_asic_utils.py", line 15, in load_db_config\r\nAttributeError: type object 'SonicDBConfig' has no attribute 'load_sonic_global_db_config'\r\n"

How did you do it?

Add exception handler.

How did you verify/test it?

Run tests in multi-asic VS 20911 image and ensure the error is not seen.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

201911 does not require loading of database config.
Add the right exception so that the exception of load db
config can be ignored for 201911 image.

Signed-off-by: Suvarna Meenakshi <[email protected]>
@SuvarnaMeenakshi SuvarnaMeenakshi marked this pull request as ready for review September 3, 2021 21:22
@SuvarnaMeenakshi SuvarnaMeenakshi requested a review from a team as a code owner September 3, 2021 21:22
@yozhao101
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@yozhao101
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca merged commit 2de0b95 into sonic-net:master Sep 8, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…et#4178)

201911 does not require loading of database config.
Add the right exception so that the exception of load db
config can be ignored for 201911 image.

Signed-off-by: Suvarna Meenakshi <[email protected]>
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.

4 participants