Skip to content

Add an option to do a safe config reload #5374

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

Merged
merged 3 commits into from
Apr 4, 2022

Conversation

saiarcot895
Copy link
Contributor

@saiarcot895 saiarcot895 commented Mar 23, 2022

Signed-off-by: Saikrishna Arcot [email protected]

Description of PR

Summary:

When doing a config reload, test cases cannot assume that the DUT is
available immediately after config_reload returns. Instead, they need
to wait on duthost.critical_services_fully_started to be true.

Therefore, in config_reload add an option safe_reload (defaults to
False to preserve current behavior) that will block on this so that the
function returns when the DUT is ready. In addition, have two test
cases (for now; other test cases will be checked later) use safe reload
so that the DUT is guaranteed to be ready when the function returns.

Otherwise, if the setup for the next test case is running while the
DUT is still bringing up the containers, then some check there could
fail.

Type of change

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

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Locally ran t0-part1 KVM test, and it succeeded, which suggests that at least nothing broke because of this change.

Any platform specific information?

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

Documentation

When doing a config reload, test cases cannot assume that the DUT is
available immediately after `config_reload` returns. Instead, they need
to wait on `duthost.critical_services_fully_started` to be true.

Therefore, in `config_reload` add an option `safe_reload` (defaults to
False to preserve current behavior) that will block on this so that the
function returns when the DUT is ready. In addition, have two test
cases (for now; other test cases will be checked later) use safe reload
so that the DUT is guaranteed to be ready when the function returns.

Otherwise, if the setup for the next test case is running while the
DUT is still bringing up the containers, then some check there could
fail.

Signed-off-by: Saikrishna Arcot <[email protected]>
@saiarcot895 saiarcot895 requested a review from a team as a code owner March 23, 2022 00:43
@lgtm-com
Copy link

lgtm-com bot commented Mar 23, 2022

This pull request fixes 1 alert when merging bd9e4aa into 0eef697 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

yxieca
yxieca previously approved these changes Mar 23, 2022
@lgtm-com
Copy link

lgtm-com bot commented Mar 23, 2022

This pull request fixes 1 alert when merging a7143de into 18b4579 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

Signed-off-by: Saikrishna Arcot <[email protected]>
@lgtm-com
Copy link

lgtm-com bot commented Mar 23, 2022

This pull request fixes 1 alert when merging 5f6485d into 18b4579 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@saiarcot895
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@saiarcot895 saiarcot895 requested a review from yxieca April 4, 2022 16:07
@yxieca yxieca merged commit f17772e into sonic-net:master Apr 4, 2022
wangxin pushed a commit that referenced this pull request Apr 5, 2022
* Add an option to do a safe config reload

When doing a config reload, test cases cannot assume that the DUT is
available immediately after `config_reload` returns. Instead, they need
to wait on `duthost.critical_services_fully_started` to be true.

Therefore, in `config_reload` add an option `safe_reload` (defaults to
False to preserve current behavior) that will block on this so that the
function returns when the DUT is ready. In addition, have two test
cases (for now; other test cases will be checked later) use safe reload
so that the DUT is guaranteed to be ready when the function returns.

Otherwise, if the setup for the next test case is running while the
DUT is still bringing up the containers, then some check there could
fail.

Signed-off-by: Saikrishna Arcot <[email protected]>
@saiarcot895 saiarcot895 deleted the add-safe-config-reload branch April 26, 2022 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants