Skip to content

[platform][cli] PSU Status Tests: Permit Daemons Some Time to enter RUNNING State#12047

Merged
prgeor merged 1 commit intosonic-net:masterfrom
ccroy-arista:psustatus-daemon-wait
Apr 17, 2024
Merged

[platform][cli] PSU Status Tests: Permit Daemons Some Time to enter RUNNING State#12047
prgeor merged 1 commit intosonic-net:masterfrom
ccroy-arista:psustatus-daemon-wait

Conversation

@ccroy-arista
Copy link
Copy Markdown
Contributor

Description of PR

This patch adds a 60-second window to the psustatus tests to allow time for the relevant daemons to reach the RUNNING state, should they be found in the STARTING state when the daemon status check occurs.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

Encountered an instance where the psustatus tests failed because the pmon daemon status check caught the applicable daemons in the STARTING state as opposed to the RUNNING state. This was seen one time; despite a few dozen attempts, have not been able to recreate the issue. This change will help guard against such potential race conditions.

How did you do it?

Added a 60 second wait (5 second interval, 0 delay) on check_pmon_daemon_status in each of the psustatus tests.

How did you verify/test it?

Ran the tests with the fixes applied and they passed.

…t loop to provide some flexibility in the amount of time it takes for the daemons to go from STARTING state to RUNNING.
@ccroy-arista ccroy-arista requested a review from prgeor as a code owner March 19, 2024 16:07
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Mar 19, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

Copy link
Copy Markdown
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

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

LGTM

@StormLiangMS
Copy link
Copy Markdown
Collaborator

@prgeor could you help to review?

@prgeor prgeor merged commit aa9a1a3 into sonic-net:master Apr 17, 2024
@StormLiangMS
Copy link
Copy Markdown
Collaborator

hi @ccroy-arista could you help to test with 202311 branch so we can do the cherry pick to avoid regression.

@ccroy-arista
Copy link
Copy Markdown
Contributor Author

Hi @StormLiangMS, the changes were tested against 202311 at the time (March 15); 10 iterations were run to establish confidence (all passed).

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Apr 19, 2024
…t loop to provide some flexibility in the amount of time it takes for the daemons to go from STARTING state to RUNNING. (sonic-net#12047)
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202311: #12513

mssonicbld pushed a commit that referenced this pull request Apr 19, 2024
…t loop to provide some flexibility in the amount of time it takes for the daemons to go from STARTING state to RUNNING. (#12047)
@ccroy-arista ccroy-arista deleted the psustatus-daemon-wait branch April 19, 2024 15:52
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.

4 participants