diff --git a/cluster-provision/gocli/opts/k8sprovision/conf/k8s_provision.sh b/cluster-provision/gocli/opts/k8sprovision/conf/k8s_provision.sh index 1bd17aa06c..37fb066745 100755 --- a/cluster-provision/gocli/opts/k8sprovision/conf/k8s_provision.sh +++ b/cluster-provision/gocli/opts/k8sprovision/conf/k8s_provision.sh @@ -62,7 +62,7 @@ function pull_container_retry() { fi } -export CRIO_VERSION=1.30 +export CRIO_VERSION="$(echo $version | cut -d. -f1).$(echo $version | cut -d. -f2)" cat << EOF >/etc/yum.repos.d/devel_kubic_libcontainers_stable_cri-o_${CRIO_VERSION}.repo [isv_kubernetes_addons_cri-o_stable_v${CRIO_VERSION}] name=CRI-O v${CRIO_VERSION} (Stable) (rpm) @@ -345,26 +345,6 @@ chmod -R 777 /var/local/kubevirt-storage/local-volume # Setup selinux permissions to local volume directories. chcon -R unconfined_u:object_r:svirt_sandbox_file_t:s0 /mnt/local-storage/ -# copy network addons operator manifests -# so we can use them at cluster-up -cp -rf /tmp/cnao/ /opt/ - -# copy whereabouts manifests -# so we can use them at cluster-up -cp -rf /tmp/whereabouts/ /opt/ - -# copy Multus CNI manifests so we can use them at cluster-up -cp -rf /tmp/multus /opt/ - -# copy cdi manifests -cp -rf /tmp/cdi*.yaml /opt/ - -# copy aaq manifests -cp -rf /tmp/aaq/ /opt/ - -# copy kwok manifests -cp -rf /tmp/kwok /opt/ - # Create a properly labelled tmp directory for testing mkdir -p /var/provision/kubevirt.io/tests chcon -t container_file_t /var/provision/kubevirt.io/tests diff --git a/cluster-provision/gocli/providers/provision.go b/cluster-provision/gocli/providers/provision.go index 31777626ba..11d8fb37b6 100644 --- a/cluster-provision/gocli/providers/provision.go +++ b/cluster-provision/gocli/providers/provision.go @@ -160,40 +160,10 @@ func (kp *KubevirtProvider) Provision(ctx context.Context, cancel context.Cancel return fmt.Errorf("error copying manifests to node") } - success, err = docker.Exec(kp.Docker, kp.nodeContainer(kp.Version, nodeName), []string{"/bin/bash", "-c", "scp -r -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vagrant.key -P 22 /scripts/k8s_provision.sh root@192.168.66.101:/tmp/k8s_provision.sh"}, os.Stdout) - if err != nil { - return err - } - - if !success { - return fmt.Errorf("error copying manifests to node") - } - - success, err = docker.Exec(kp.Docker, kp.nodeContainer(kp.Version, nodeName), []string{"/bin/bash", "-c", "if [ -f /scripts/extra-pre-pull-images ]; then scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vagrant.key -P 22 /scripts/extra-pre-pull-images vagrant@192.168.66.101:/tmp/extra-pre-pull-images; fi"}, os.Stdout) - if err != nil { - return err - } - - if !success { - return fmt.Errorf("error copying manifests to node") - } - - success, err = docker.Exec(kp.Docker, kp.nodeContainer(kp.Version, nodeName), []string{"/bin/bash", "-c", "if [ -f /scripts/fetch-images.sh ]; then scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vagrant.key -P 22 /scripts/fetch-images.sh vagrant@192.168.66.101:/tmp/fetch-images.sh; fi"}, os.Stdout) - if err != nil { - return err - } - - if !success { - return fmt.Errorf("error copying manifests to node") - } - provisionK8sOpt := k8sprovision.NewK8sProvisioner(sshClient, k8sVersion, kp.Slim) if err = provisionK8sOpt.Exec(); err != nil { return err } - // if err = sshClient.Command(fmt.Sprintf("sudo version=%s bash /tmp/k8s_provision.sh", k8sVersion)); err != nil { - // return err - // } } _ = sshClient.Command("sudo shutdown now -h")