Skip to content

Commit fcccc62

Browse files
Merge pull request #14662 from marun/fix-leaderelection-logging
Fix leader election logging
2 parents e38d9a3 + 59dea51 commit fcccc62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/cmd/server/origin/leaderelection.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ func legacyLeaderElectionStart(id, name string, leased *plug.Leased, lock rl.Int
133133
leased.Stop(nil)
134134
return true, nil
135135
}
136-
utilruntime.HandleError(fmt.Errorf("unable to confirm %s lease exists: %v", name, err))
136+
// NotFound indicates the endpoint is missing and the etcd lease should continue to be held
137+
if !kapierrors.IsNotFound(err) {
138+
utilruntime.HandleError(fmt.Errorf("unable to confirm %s lease exists: %v", name, err))
139+
}
137140
return false, nil
138141
})
139142
}

0 commit comments

Comments
 (0)