From 2795ceb8ee136e3f25dfbe0eba16baccb708911d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 4 Sep 2018 09:40:36 +0200 Subject: [PATCH] bots: Fix openshift image build - Drop kubevirt for now. It has been broken for many months now (#9479, #9638), and we must rebuild openshift to finally unbreak our cockpit/ws container (#9941). kubevirt tests continue to run on the openshift-prerelease image. - Move image to fedora-28, so that we can move cockpit/ws and cockpit/base to fedora-28. - Update workaround for https://github.com/openshift/origin/issues/18715 to install "openssl", which is not in the default install any more on Fedora 28. Fixes #9479 Closes #9975 --- bots/images/scripts/openshift.bootstrap | 2 +- bots/images/scripts/openshift.setup | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bots/images/scripts/openshift.bootstrap b/bots/images/scripts/openshift.bootstrap index 74d601d5bf93..8c6f53e3ff8d 100755 --- a/bots/images/scripts/openshift.bootstrap +++ b/bots/images/scripts/openshift.bootstrap @@ -1,4 +1,4 @@ #! /bin/bash BASE=$(dirname $0) -BOOTSTRAP_VOLUME_SIZE="20G" $BASE/virt-builder-fedora "$1" fedora-27 x86_64 +BOOTSTRAP_VOLUME_SIZE="20G" $BASE/virt-builder-fedora "$1" fedora-28 x86_64 diff --git a/bots/images/scripts/openshift.setup b/bots/images/scripts/openshift.setup index 0518fded7060..05c1fc266be2 100755 --- a/bots/images/scripts/openshift.setup +++ b/bots/images/scripts/openshift.setup @@ -154,6 +154,7 @@ update-ca-trust extract # multiple O= RDNs; if it's in the "wrong" order, create a new admin # certificate that swaps it around # See https://github.com/openshift/origin/issues/18715 +dnf install -y openssl if openssl x509 -in /openshift.local.config/master/admin.crt -text | grep -q 'Subject:.*system:cluster-admins.*system:masters'; then echo "Regenerating admin certificate to work around https://github.com/openshift/origin/issues/18715" pushd /openshift.local.config/master/ @@ -304,11 +305,14 @@ printf 'AuthorizedKeysCommand /usr/local/bin/authorized-kube-keys --kubeconfig=/ # Pull down remaining images /var/lib/testvm/docker-images.setup -# Prepare Kubevirt for later installation -/var/lib/testvm/kubevirt.setup +# kubevirt is currently uninstallable: https://github.com/cockpit-project/cockpit/pull/9638 +if [ -n "$PRERELEASE" ]; then + # Prepare Kubevirt for later installation + /var/lib/testvm/kubevirt.setup -# use the pristine kube config; kubevirt.setup changes it -cp /openshift.local.config/master/admin.kubeconfig /root/.kube/config + # use the pristine kube config; kubevirt.setup changes it + cp /openshift.local.config/master/admin.kubeconfig /root/.kube/config +fi dnf install -y cockpit-system