Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data/bootstrap/files/usr/local/bin/bootkube.sh.template: Set --tear-down-event #1147

Closed
Closed
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions cmd/openshift-install/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func destroyBootstrap(ctx context.Context, config *rest.Config, directory string
events := client.CoreV1().Events("kube-system")

eventTimeout := 30 * time.Minute
logrus.Infof("Waiting up to %v for the bootstrap-complete event...", eventTimeout)
logrus.Infof("Waiting up to %v for the bootstrap-success event...", eventTimeout)
eventContext, cancel := context.WithTimeout(ctx, eventTimeout)
defer cancel()
_, err = Until(
Expand Down Expand Up @@ -268,11 +268,11 @@ func destroyBootstrap(ctx context.Context, config *rest.Config, directory string
}

logrus.Debugf("added %s: %s", event.Name, event.Message)
return event.Name == "bootstrap-complete", nil
return event.Name == "bootstrap-success", nil
},
)
if err != nil {
return errors.Wrap(err, "waiting for bootstrap-complete")
return errors.Wrap(err, "waiting for bootstrap-success")
}

logrus.Info("Destroying the bootstrap resources...")
Expand Down
6 changes: 5 additions & 1 deletion data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ podman run \
--volume /etc/kubernetes:/etc/kubernetes:z \
--network=host \
"${CLUSTER_BOOTSTRAP_IMAGE}" \
start --asset-dir=/assets --required-pods openshift-kube-apiserver/openshift-kube-apiserver,openshift-kube-scheduler/openshift-kube-scheduler,openshift-kube-controller-manager/openshift-kube-controller-manager,openshift-cluster-version/cluster-version-operator
start \
--asset-dir=/assets \
--strict \
--tear-down-event run-forever \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not convinced this is a good idea. We do not solve the load balancer problem, we only push it from ELB related to be kube-proxy related. All clients using in-cluster connection using the service IP will fall over (in the best case when the bootstrap machine is terminated). In the worst case, they will have pending watch TCP connection to a machine which is not there anymore.

@squeed can you comment about that? How do TCP connections to service IPs behave if the target machine disappears?

--required-pods openshift-kube-apiserver/openshift-kube-apiserver,openshift-kube-scheduler/openshift-kube-scheduler,openshift-kube-controller-manager/openshift-kube-controller-manager,openshift-cluster-version/cluster-version-operator

# Workaround for https://github.com/opencontainers/runc/pull/1807
touch /opt/openshift/.bootkube.done
71 changes: 0 additions & 71 deletions data/data/bootstrap/files/usr/local/bin/openshift.sh

This file was deleted.

38 changes: 0 additions & 38 deletions data/data/bootstrap/files/usr/local/bin/report-progress.sh

This file was deleted.

12 changes: 0 additions & 12 deletions data/data/bootstrap/systemd/units/openshift.service

This file was deleted.

14 changes: 0 additions & 14 deletions data/data/bootstrap/systemd/units/progress.service

This file was deleted.

2 changes: 1 addition & 1 deletion docs/design/assetgeneration.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $ openshift-install create install-config
# Generate install-config.yaml

$ openshift-install create manifests
# Generate manifests/ and openshift/ dir, also remove install-config.yaml
# Generate manifests/ and post-pod-manifests/ directories, also remove install-config.yaml
```

## Target generation
Expand Down
2 changes: 1 addition & 1 deletion docs/user/aws/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Step 3: Download the Installer.
[~]$ openshift-install-linux-amd64 create cluster
INFO Waiting up to 30m0s for the Kubernetes API...
INFO API v1.11.0+85a0623 up
INFO Waiting up to 30m0s for the bootstrap-complete event...
INFO Waiting up to 30m0s for the bootstrap-success event...
INFO Destroying the bootstrap resources...
INFO Waiting up to 10m0s for the openshift-console route to be created...
INFO Install complete!
Expand Down
2 changes: 1 addition & 1 deletion pkg/asset/ignition/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (a *Bootstrap) addStorageFiles(base string, uri string, templateData *boots

func (a *Bootstrap) addSystemdUnits(uri string, templateData *bootstrapTemplateData) (err error) {
enabled := map[string]struct{}{
"progress.service": {},
"bootkube.service": {},
"kubelet.service": {},
"systemd-journal-gatewayd.socket": {},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/asset/manifests/openshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

const (
openshiftManifestDir = "openshift"
openshiftManifestDir = "post-pod-manifests"
)

var (
Expand Down