Skip to content
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

Spread reconfigure in one rack #116

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Better
  • Loading branch information
majst01 committed Jan 17, 2024
commit 8a10bd8bd7f6948cb665b99b692ed30b7dc770a0
7 changes: 3 additions & 4 deletions cmd/internal/core/reconfigure-switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,14 @@ func waitForTicker(hostname string, interval time.Duration, log *slog.Logger) {
index = 1
log.Warn("unable to parse leaf number from hostname, not spreading switch reloads", "hostname", hostname, "error", err)
}
tries := 0
startSearch := time.Now()
for {
second := time.Now().Second()
if second%(int(interval)) == 0 {
break
}
// Ensure we break for sure
tries++
if tries > 20 {
// Ensure we break for sure after one minute
if time.Since(startSearch) > 1*time.Minute {
log.Warn("unable to find a matching start second, abort calculating spreading")
break
}
Expand Down
Loading