Skip to content

Commit 83775ba

Browse files
Merge pull request #16040 from enj/enj/t/healthz_integration_wait
Automatic merge from submit-queue (batch tested with PRs 16076, 16053, 16066, 16049, 16040) Wait longer for healthz during integration tests Adding post start hooks makes it take longer for the server to report that it is healthy. Thus we wait longer to ensure that the server actually failed to start. Signed-off-by: Monis Khan <[email protected]>
2 parents 446f862 + 2b121fc commit 83775ba

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pkg/cmd/server/kubernetes/node/node_config.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func BuildKubernetesNodeConfig(options configapi.NodeConfig, enableProxy, enable
201201
},
202202
Webhook: componentconfig.KubeletWebhookAuthentication{
203203
Enabled: true,
204-
CacheTTL: metav1.Duration{authnTTL},
204+
CacheTTL: metav1.Duration{Duration: authnTTL},
205205
},
206206
Anonymous: componentconfig.KubeletAnonymousAuthentication{
207207
Enabled: true,
@@ -214,8 +214,8 @@ func BuildKubernetesNodeConfig(options configapi.NodeConfig, enableProxy, enable
214214
server.Authorization = componentconfig.KubeletAuthorization{
215215
Mode: componentconfig.KubeletAuthorizationModeWebhook,
216216
Webhook: componentconfig.KubeletWebhookAuthorization{
217-
CacheAuthorizedTTL: metav1.Duration{authzTTL},
218-
CacheUnauthorizedTTL: metav1.Duration{authzTTL},
217+
CacheAuthorizedTTL: metav1.Duration{Duration: authzTTL},
218+
CacheUnauthorizedTTL: metav1.Duration{Duration: authzTTL},
219219
},
220220
}
221221

pkg/cmd/server/origin/openshift_apiserver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ func (c *OpenshiftAPIConfig) ensureOpenShiftInfraNamespace(context genericapiser
582582
// Ensure we have the bootstrap SA for Nodes
583583
_, err = c.KubeClientInternal.Core().ServiceAccounts(ns).Create(&kapi.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: bootstrappolicy.InfraNodeBootstrapServiceAccountName}})
584584
if err != nil && !kapierror.IsAlreadyExists(err) {
585-
glog.Errorf("Error creating service account %s/%s: %v", namespace, bootstrappolicy.InfraNodeBootstrapServiceAccountName, err)
585+
glog.Errorf("Error creating service account %s/%s: %v", ns, bootstrappolicy.InfraNodeBootstrapServiceAccountName, err)
586586
}
587587

588588
EnsureNamespaceServiceAccountRoleBindings(c.KubeClientInternal, c.DeprecatedOpenshiftClient, namespace)

pkg/router/controller/factory/factory.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (factory *RouterControllerFactory) Create(plugin router.Plugin, watchNodes,
8585
field: factory.Fields,
8686
label: factory.Labels,
8787
}
88-
cache.NewReflector(&cache.ListWatch{rLW.List, rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()
88+
cache.NewReflector(&cache.ListWatch{ListFunc: rLW.List, WatchFunc: rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()
8989

9090
endpointsEventQueue := oscache.NewEventQueue(routerKeyFn)
9191
cache.NewReflector(&endpointsLW{
@@ -223,7 +223,7 @@ func (factory *RouterControllerFactory) CreateNotifier(changed func()) RoutesByH
223223
field: factory.Fields,
224224
label: factory.Labels,
225225
}
226-
cache.NewReflector(&cache.ListWatch{rLW.List, rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()
226+
cache.NewReflector(&cache.ListWatch{ListFunc: rLW.List, WatchFunc: rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()
227227

228228
endpointStore := cache.NewStore(keyFn)
229229
endpointsEventQueue := oscache.NewEventQueueForStore(keyFn, endpointStore)

test/util/server/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ func StartConfiguredMasterWithOptions(masterConfig *configapi.MasterConfig, test
464464
}
465465

466466
var healthzResponse string
467-
err = wait.Poll(100*time.Millisecond, 10*time.Second, func() (bool, error) {
467+
err = wait.Poll(time.Second, time.Minute, func() (bool, error) {
468468
var healthy bool
469469
healthy, healthzResponse, err = IsServerHealthy(*masterURL)
470470
if err != nil {

0 commit comments

Comments
 (0)