Skip to content

Commit 5c895ea

Browse files
p0lyn0mialbertinatto
authored andcommitted
UPSTREAM: <carry>: replace newETCD3ProberMonitor with etcd3RetryingProberMonitor
1 parent 0d4fff3 commit 5c895ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ func newETCD3Check(c storagebackend.Config, timeout time.Duration, stopCh <-chan
156156
// retry in a loop in the background until we successfully create the client, storing the client or error encountered
157157

158158
lock := sync.RWMutex{}
159-
var prober *etcd3ProberMonitor
159+
var prober *etcd3RetryingProberMonitor
160160
clientErr := fmt.Errorf("etcd client connection not yet established")
161161

162162
go wait.PollImmediateUntil(time.Second, func() (bool, error) {
163163
lock.Lock()
164164
defer lock.Unlock()
165-
newProber, err := newETCD3ProberMonitor(c)
165+
newProber, err := newRetryingETCD3ProberMonitor(c)
166166
// Ensure that server is already not shutting down.
167167
select {
168168
case <-stopCh:

staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/factory.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func CreateProber(c storagebackend.Config) (Prober, error) {
6969
case storagebackend.StorageTypeETCD2:
7070
return nil, fmt.Errorf("%s is no longer a supported storage backend", c.Type)
7171
case storagebackend.StorageTypeUnset, storagebackend.StorageTypeETCD3:
72-
return newETCD3ProberMonitor(c)
72+
return newRetryingETCD3ProberMonitor(c)
7373
default:
7474
return nil, fmt.Errorf("unknown storage type: %s", c.Type)
7575
}
@@ -80,7 +80,7 @@ func CreateMonitor(c storagebackend.Config) (metrics.Monitor, error) {
8080
case storagebackend.StorageTypeETCD2:
8181
return nil, fmt.Errorf("%s is no longer a supported storage backend", c.Type)
8282
case storagebackend.StorageTypeUnset, storagebackend.StorageTypeETCD3:
83-
return newETCD3ProberMonitor(c)
83+
return newRetryingETCD3ProberMonitor(c)
8484
default:
8585
return nil, fmt.Errorf("unknown storage type: %s", c.Type)
8686
}

0 commit comments

Comments
 (0)