Skip to content

Commit

Permalink
Increase bootstrap timeout, not k8s API timeout
Browse files Browse the repository at this point in the history
This fixes a previous change where we mistakenly increased the
Kubernetes API timeout instead of the bootstrap timeout.
  • Loading branch information
honza committed Jun 15, 2022
1 parent f39a157 commit e4f7e09
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions cmd/openshift-install/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,6 @@ func waitForBootstrapComplete(ctx context.Context, config *rest.Config) *cluster

apiTimeout := 20 * time.Minute

// Wait longer for baremetal, due to length of time it takes to boot
if assetStore, err := assetstore.NewStore(rootOpts.dir); err == nil {
if installConfig, err := assetStore.Load(&installconfig.InstallConfig{}); err == nil && installConfig != nil {
if installConfig.(*installconfig.InstallConfig).Config.Platform.Name() == baremetal.Name {
apiTimeout = 60 * time.Minute
}
}
}

untilTime := time.Now().Add(apiTimeout)
logrus.Infof("Waiting up to %v (until %v) for the Kubernetes API at %s...",
apiTimeout, untilTime.Format(time.Kitchen), config.Host)
Expand Down Expand Up @@ -411,6 +402,16 @@ func waitForBootstrapComplete(ctx context.Context, config *rest.Config) *cluster
// completed.
func waitForBootstrapConfigMap(ctx context.Context, client *kubernetes.Clientset) *clusterCreateError {
timeout := 30 * time.Minute

// Wait longer for baremetal, due to length of time it takes to boot
if assetStore, err := assetstore.NewStore(rootOpts.dir); err == nil {
if installConfig, err := assetStore.Load(&installconfig.InstallConfig{}); err == nil && installConfig != nil {
if installConfig.(*installconfig.InstallConfig).Config.Platform.Name() == baremetal.Name {
timeout = 60 * time.Minute
}
}
}

untilTime := time.Now().Add(timeout)
logrus.Infof("Waiting up to %v (until %v) for bootstrapping to complete...",
timeout, untilTime.Format(time.Kitchen))
Expand Down

0 comments on commit e4f7e09

Please sign in to comment.