mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
Merge pull request #119824 from aojea/deflake_TestCreateHealthcheck
fix race creating etcd client for healthchecks
This commit is contained in:
commit
f46583dcaa
@ -157,10 +157,10 @@ func newETCD3Check(c storagebackend.Config, timeout time.Duration, stopCh <-chan
|
|||||||
var prober *etcd3ProberMonitor
|
var prober *etcd3ProberMonitor
|
||||||
clientErr := fmt.Errorf("etcd client connection not yet established")
|
clientErr := fmt.Errorf("etcd client connection not yet established")
|
||||||
|
|
||||||
go wait.PollUntil(time.Second, func() (bool, error) {
|
go wait.PollImmediateUntil(time.Second, func() (bool, error) {
|
||||||
newProber, err := newETCD3ProberMonitor(c)
|
|
||||||
lock.Lock()
|
lock.Lock()
|
||||||
defer lock.Unlock()
|
defer lock.Unlock()
|
||||||
|
newProber, err := newETCD3ProberMonitor(c)
|
||||||
// Ensure that server is already not shutting down.
|
// Ensure that server is already not shutting down.
|
||||||
select {
|
select {
|
||||||
case <-stopCh:
|
case <-stopCh:
|
||||||
|
Loading…
Reference in New Issue
Block a user