Skip to content
Open
Changes from all commits
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
13 changes: 12 additions & 1 deletion ring/basic_lifecycler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"net/http"
"sort"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -353,7 +354,17 @@ func (l *BasicLifecycler) registerInstance(ctx context.Context) error {
})

if err != nil {
return err
// If the KV store detected no change (the instance's ring entry already matches
// what we tried to write), the registration is effectively successful. This can
// happen when the stored timestamp is ahead of the current time (e.g., clock
// corruption) — the merge function sees no forward progress and returns
// "no change detected." Treating this as fatal causes a permanent CrashLoopBackOff
// because the same no-change result recurs on every restart (issue grafana/loki#21733).
if strings.Contains(err.Error(), "no change detected") {
level.Warn(l.logger).Log("msg", "CAS detected no change during registration; instance already registered with identical state", "ring", l.ringName, "instance", l.cfg.ID, "err", err)
} else {
return err
}
}

l.currState.Lock()
Expand Down