Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions cmd/openshift-install/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"crypto/x509"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
Expand Down Expand Up @@ -105,10 +106,15 @@ var (
logrus.Fatal("Bootstrap failed to complete: ", err)
}

logrus.Info("Destroying the bootstrap resources...")
err = destroybootstrap.Destroy(rootOpts.dir)
if err != nil {
logrus.Fatal(err)
if oi, ok := os.LookupEnv("OPENSHIFT_INSTALL_PRESERVE_BOOTSTRAP"); ok && oi != "" {
logrus.Warn("OPENSHIFT_INSTALL_PRESERVE_BOOTSTRAP is set, not destroying bootstrap resources. " +
"Warning: this should only be used for debugging purposes, and poses a risk to cluster stability.")
} else {
logrus.Info("Destroying the bootstrap resources...")
err = destroybootstrap.Destroy(rootOpts.dir)
if err != nil {
logrus.Fatal(err)
}
}

err = waitForInstallComplete(ctx, config, rootOpts.dir)
Expand Down Expand Up @@ -244,7 +250,7 @@ func waitForBootstrapComplete(ctx context.Context, config *rest.Config, director

discovery := client.Discovery()

apiTimeout := 30 * time.Minute
apiTimeout := 20 * time.Minute
logrus.Infof("Waiting up to %v for the Kubernetes API at %s...", apiTimeout, config.Host)
apiContext, cancel := context.WithTimeout(ctx, apiTimeout)
defer cancel()
Expand Down Expand Up @@ -285,7 +291,7 @@ func waitForBootstrapComplete(ctx context.Context, config *rest.Config, director
// and waits for the bootstrap configmap to report that bootstrapping has
// completed.
func waitForBootstrapConfigMap(ctx context.Context, client *kubernetes.Clientset) error {
timeout := 30 * time.Minute
timeout := 40 * time.Minute
logrus.Infof("Waiting up to %v for bootstrapping to complete...", timeout)

waitCtx, cancel := context.WithTimeout(ctx, timeout)
Expand Down