Skip to content

Commit

Permalink
Merge pull request #16040 from enj/enj/t/healthz_integration_wait
Browse files Browse the repository at this point in the history
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 <mkhan@redhat.com>
  • Loading branch information
openshift-merge-robot committed Sep 1, 2017
2 parents 446f862 + 2b121fc commit 83775ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/server/kubernetes/node/node_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func BuildKubernetesNodeConfig(options configapi.NodeConfig, enableProxy, enable
},
Webhook: componentconfig.KubeletWebhookAuthentication{
Enabled: true,
CacheTTL: metav1.Duration{authnTTL},
CacheTTL: metav1.Duration{Duration: authnTTL},
},
Anonymous: componentconfig.KubeletAnonymousAuthentication{
Enabled: true,
Expand All @@ -214,8 +214,8 @@ func BuildKubernetesNodeConfig(options configapi.NodeConfig, enableProxy, enable
server.Authorization = componentconfig.KubeletAuthorization{
Mode: componentconfig.KubeletAuthorizationModeWebhook,
Webhook: componentconfig.KubeletWebhookAuthorization{
CacheAuthorizedTTL: metav1.Duration{authzTTL},
CacheUnauthorizedTTL: metav1.Duration{authzTTL},
CacheAuthorizedTTL: metav1.Duration{Duration: authzTTL},
CacheUnauthorizedTTL: metav1.Duration{Duration: authzTTL},
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/origin/openshift_apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ func (c *OpenshiftAPIConfig) ensureOpenShiftInfraNamespace(context genericapiser
// Ensure we have the bootstrap SA for Nodes
_, err = c.KubeClientInternal.Core().ServiceAccounts(ns).Create(&kapi.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: bootstrappolicy.InfraNodeBootstrapServiceAccountName}})
if err != nil && !kapierror.IsAlreadyExists(err) {
glog.Errorf("Error creating service account %s/%s: %v", namespace, bootstrappolicy.InfraNodeBootstrapServiceAccountName, err)
glog.Errorf("Error creating service account %s/%s: %v", ns, bootstrappolicy.InfraNodeBootstrapServiceAccountName, err)
}

EnsureNamespaceServiceAccountRoleBindings(c.KubeClientInternal, c.DeprecatedOpenshiftClient, namespace)
Expand Down
4 changes: 2 additions & 2 deletions pkg/router/controller/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (factory *RouterControllerFactory) Create(plugin router.Plugin, watchNodes,
field: factory.Fields,
label: factory.Labels,
}
cache.NewReflector(&cache.ListWatch{rLW.List, rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()
cache.NewReflector(&cache.ListWatch{ListFunc: rLW.List, WatchFunc: rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()

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

endpointStore := cache.NewStore(keyFn)
endpointsEventQueue := oscache.NewEventQueueForStore(keyFn, endpointStore)
Expand Down
2 changes: 1 addition & 1 deletion test/util/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ func StartConfiguredMasterWithOptions(masterConfig *configapi.MasterConfig, test
}

var healthzResponse string
err = wait.Poll(100*time.Millisecond, 10*time.Second, func() (bool, error) {
err = wait.Poll(time.Second, time.Minute, func() (bool, error) {
var healthy bool
healthy, healthzResponse, err = IsServerHealthy(*masterURL)
if err != nil {
Expand Down

0 comments on commit 83775ba

Please sign in to comment.