diff --git a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template index 561cf767f41..bba3e9dddc7 100755 --- a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template +++ b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template @@ -48,6 +48,13 @@ systemctl restart cri-o.service mkdir --parents ./{bootstrap-manifests,manifests} +if [ ! -f openshift-manifests.done ] +then + echo "Moving OpenShift manifests in with the rest of them" + cp openshift/* manifests/ + touch openshift-manifests.done +fi + if [ ! -f cvo-bootstrap.done ] then echo "Rendering Cluster Version Operator Manifests..." diff --git a/data/data/bootstrap/files/usr/local/bin/installer-gather.sh b/data/data/bootstrap/files/usr/local/bin/installer-gather.sh index 8a3f55ff20b..7f0a1dc7660 100755 --- a/data/data/bootstrap/files/usr/local/bin/installer-gather.sh +++ b/data/data/bootstrap/files/usr/local/bin/installer-gather.sh @@ -4,7 +4,7 @@ ARTIFACTS="/tmp/artifacts" echo "Gathering bootstrap journals ..." mkdir -p "${ARTIFACTS}/bootstrap/journals" -for service in release-image bootkube openshift kubelet crio approve-csr +for service in release-image bootkube kubelet crio approve-csr do journalctl --boot --no-pager --output=short --unit="${service}" > "${ARTIFACTS}/bootstrap/journals/${service}.log" done diff --git a/data/data/bootstrap/files/usr/local/bin/openshift.sh b/data/data/bootstrap/files/usr/local/bin/openshift.sh deleted file mode 100755 index 7e3ce554205..00000000000 --- a/data/data/bootstrap/files/usr/local/bin/openshift.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -set -e - -KUBECONFIG="$1" - -kubectl() { - echo "Executing kubectl $*" >&2 - while true - do - set +e - out=$(oc --config="$KUBECONFIG" "$@" 2>&1) - status=$? - set -e - - if grep --quiet "AlreadyExists" <<< "$out" - then - echo "$out, skipping" >&2 - return - fi - - echo "$out" - if [ "$status" -eq 0 ] - then - return - fi - - echo "kubectl $* failed. Retrying in 5 seconds..." >&2 - sleep 5 - done -} - -for file in $(find . -maxdepth 1 -type f | sort) -do - echo "Creating object from file: $file ..." - kubectl create --filename "$file" - echo "Done creating object from file: $file ..." -done - -# Workaround for https://github.com/opencontainers/runc/pull/1807 -touch /opt/openshift/.openshift.done - -echo "OpenShift installation is done" diff --git a/data/data/bootstrap/files/usr/local/bin/report-progress.sh b/data/data/bootstrap/files/usr/local/bin/report-progress.sh index b305f9590bc..4c60fad2446 100755 --- a/data/data/bootstrap/files/usr/local/bin/report-progress.sh +++ b/data/data/bootstrap/files/usr/local/bin/report-progress.sh @@ -11,7 +11,6 @@ wait_for_existance() { echo "Waiting for bootstrap to complete..." wait_for_existance /opt/openshift/.bootkube.done -wait_for_existance /opt/openshift/.openshift.done echo "Reporting install progress..." while ! oc --config="$KUBECONFIG" create -f - <<-EOF diff --git a/data/data/bootstrap/gcp/files/usr/local/bin/report-progress.sh b/data/data/bootstrap/gcp/files/usr/local/bin/report-progress.sh index 7e0943b7f5d..98ce77bb1ef 100755 --- a/data/data/bootstrap/gcp/files/usr/local/bin/report-progress.sh +++ b/data/data/bootstrap/gcp/files/usr/local/bin/report-progress.sh @@ -11,7 +11,6 @@ wait_for_existance() { echo "Waiting for bootstrap to complete..." wait_for_existance /opt/openshift/.bootkube.done -wait_for_existance /opt/openshift/.openshift.done ## remove the routes setup so that we can open up the blackhole systemctl stop gcp-routes.service diff --git a/data/data/bootstrap/systemd/units/openshift.service b/data/data/bootstrap/systemd/units/openshift.service deleted file mode 100644 index bb0d2207e8d..00000000000 --- a/data/data/bootstrap/systemd/units/openshift.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Bootstrap an OpenShift cluster -Wants=bootkube.service -After=bootkube.service -ConditionPathExists=!/opt/openshift/.openshift.done - -[Service] -WorkingDirectory=/opt/openshift/openshift -ExecStart=/usr/local/bin/openshift.sh /opt/openshift/auth/kubeconfig-loopback - -Restart=on-failure -RestartSec=5s diff --git a/data/data/bootstrap/systemd/units/progress.service b/data/data/bootstrap/systemd/units/progress.service index 09677d09898..81c1350a706 100644 --- a/data/data/bootstrap/systemd/units/progress.service +++ b/data/data/bootstrap/systemd/units/progress.service @@ -1,8 +1,8 @@ [Unit] Description=Report the completion of the cluster bootstrap process # Workaround for https://github.com/systemd/systemd/issues/1312 -Wants=bootkube.service openshift.service -After=bootkube.service openshift.service +Wants=bootkube.service +After=bootkube.service [Service] ExecStart=/usr/local/bin/report-progress.sh /opt/openshift/auth/kubeconfig