From c4a666991207f9434a819da9bac8b3603ad3d66e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 28 Jul 2022 07:21:27 -0700 Subject: [PATCH] Revert cri-dockerd changes This was apparently not tested on Ubuntu jammy and has broken Nodepool testing. https://zuul.opendev.org/t/zuul/build/9ae631c37a384b4bb63515c6c5f04a00 Revert "ensure-kubernetes: pull cri-dockerd systemd from tag" This reverts commit ad0ea28b6a2cbc8d68ee1a05e6a1d2712102dca4. Revert "ensure-kubernetes: install cri-dockerd; fix networking" This reverts commit 08c922fd988e98bd93d5a6d488a98e5b76797e18. Change-Id: Ic20b8840c478b6d81626f728b8661ef5946e12d4 --- roles/ensure-kubernetes/tasks/minikube.yaml | 40 ++------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/roles/ensure-kubernetes/tasks/minikube.yaml b/roles/ensure-kubernetes/tasks/minikube.yaml index 7f355fdff..682256f46 100644 --- a/roles/ensure-kubernetes/tasks/minikube.yaml +++ b/roles/ensure-kubernetes/tasks/minikube.yaml @@ -17,8 +17,7 @@ # Ubuntu focal doesn't have cri-o-1.15 packages, per distro tasks is # required to install crio - name: Install crio - # Note this is required even for the docker runtime, as minikube only - # supports cri now. See below for the docker wrapper + when: kubernetes_runtime == 'cri-o' include_tasks: "{{ zj_distro_os }}" with_first_found: - "crio-{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml" @@ -28,6 +27,7 @@ - name: Workaround missing 02-crio.conf # See: https://github.com/kubernetes/minikube/issues/13816 + when: kubernetes_runtime == 'cri-o' block: - name: Add misisng crio.conf.d folder file: @@ -84,41 +84,6 @@ extra_args: "--extra-config=kubelet.resolv-conf={{ ansible_user_dir }}/.minikube/k8s_resolv.conf" when: minikube_dns_resolvers|length>0 -# See https://github.com/kubernetes/minikube/issues/14410 -- name: Setup cri-dockerd - when: kubernetes_runtime == 'docker' - become: yes - block: - - name: Check for pre-existing cri-docker service - stat: - path: '/etc/system/cri-docker.service' - register: _cri_docker - - - name: Install cri-docker - when: not _cri_docker.stat.exists - shell: | - set -x - VER=$(curl -s https://api.github.com/repos/Mirantis/cri-dockerd/releases/latest|grep tag_name | cut -d '"' -f 4|sed 's/v//g') - DL=$(mktemp -d) - pushd ${DL} - wget https://github.com/Mirantis/cri-dockerd/releases/download/v${VER}/cri-dockerd-${VER}.amd64.tgz - tar xvf cri-dockerd-${VER}.amd64.tgz - mv cri-dockerd/cri-dockerd /usr/local/bin - wget https://raw.githubusercontent.com/Mirantis/cri-dockerd/v${VER}/packaging/systemd/cri-docker.service - wget https://raw.githubusercontent.com/Mirantis/cri-dockerd/v${VER}/packaging/systemd/cri-docker.socket - sudo mv cri-docker.socket cri-docker.service /etc/systemd/system/ - sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service - popd - rm -rf ${DL} - systemctl daemon-reload - args: - executable: '/bin/bash' - - - name: Ensure cri-dockerd running - service: - name: cri-docker - state: started - - name: Start Minikube become: yes command: >- @@ -130,7 +95,6 @@ {% for _addon in ensure_kubernetes_minikube_addons %} --addons={{ _addon }} {% endfor %} - {{ '--network-plugin=cni' if kubernetes_runtime == 'cri-o' }} environment: MINIKUBE_WANTUPDATENOTIFICATION: false MINIKUBE_WANTREPORTERRORPROMPT: false