sonic-mgmt icon indicating copy to clipboard operation
sonic-mgmt copied to clipboard

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

Open ccroy-arista opened this issue 1 year ago • 2 comments

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

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

Back port request

  • [ ] 201911
  • [ ] 202012
  • [ ] 202205
  • [ ] 202305
  • [x] 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.

ccroy-arista avatar Mar 19 '24 16:03 ccroy-arista

@prgeor could you help to review?

StormLiangMS avatar Apr 12 '24 02:04 StormLiangMS

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

StormLiangMS avatar Apr 19 '24 04:04 StormLiangMS

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

ccroy-arista avatar Apr 19 '24 04:04 ccroy-arista

Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-mgmt/pull/12513

mssonicbld avatar Apr 19 '24 04:04 mssonicbld