Skip to content

Commit

Permalink
lightweight-check-mlag-health: Changed sleep time
Browse files Browse the repository at this point in the history
The sleep time to re-check the MLAG status should be the minimum of the polling interval and remaining time left before timeout values
Author:    Joe Recchia <[email protected]>

Change-Id: Ief087033c50d22ba376eaa574409a85d7c2e4212
  • Loading branch information
jrecchia1029 authored and cianmcgrath committed Nov 11, 2022
1 parent f06a8ab commit 3da17bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def isMlagUp():
# If mlag is not up, log it's current status
ctx.alog(status)
# Calculate how long before next check, and ensure that we don't go over the timeout
sleepTime = max(pollInterval, duration)
sleepTime = min(pollInterval, duration)
time.sleep(sleepTime)
# Update the remaining time
duration -= sleepTime
Expand Down
2 changes: 1 addition & 1 deletion lightweight-check-mlag-health-action-pack/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type: PACKAGE
version: 1.0.0
version: 1.0.1
name: lightweight-check-mlag-health Action package
description: Action package containing a custom script that monitors a device's mlag ports health to ensure they come up

0 comments on commit 3da17bb

Please sign in to comment.