1e133ba51d
This updates the ensure-kubernetes testing to check the pod is actually running. This was hiding some issues on Jammy where the installation succeeded but the pod was not ready. The essence of the problem seems to be that the containernetworking-plugins tools are coming from upstream packages on Ubuntu Jammy. This native package places the networking tools in a different location to those from the Opensuse kubic repo. We need to update the cri-o path and the docker path for our jobs. For cri-o this is just an update to the config file, which is separated out into the crio-Ubuntu-22.04 include file. For docker things are bit harder, because you need the cri-docker shim now to use a docker runtime with kubernetes. Per the note inline, this shim has some hard-coded assumptions which mean we need to override the way it overrides (!). This works but does all feel a bit fragile; we should probably consider our overall support for the docker backend. With ensure-kubernetes working now, we can revert the non-voting jobs from the eariler change Id6ee7ed38fec254493a2abbfa076b9671c907c83. Change-Id: I5f02f4e056a0e731d74d00ebafa96390c06175cf
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
- name: Add all repositories
|
|
include_role:
|
|
name: ensure-package-repositories
|
|
vars:
|
|
repositories_keys:
|
|
- url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/Release.key"
|
|
- url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.24/xUbuntu_{{ ansible_distribution_version }}/Release.key"
|
|
repositories_list:
|
|
- repo: "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/ /"
|
|
- repo: "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.24/xUbuntu_{{ ansible_distribution_version }}/ /"
|
|
- name: Install packages
|
|
package:
|
|
name:
|
|
- cri-o
|
|
- cri-o-runc
|
|
- containernetworking-plugins
|
|
- podman
|
|
- cri-tools
|
|
state: present
|
|
become: true
|
|
|
|
- name: Find networking plugins
|
|
ini_file:
|
|
path: /etc/crio/crio.conf
|
|
section: crio.network
|
|
option: plugin_dirs
|
|
value:
|
|
- '/opt/cni/bin/'
|
|
- '/usr/lib/cni'
|
|
mode: 0644
|
|
become: true
|
|
register: _crio_conf_updated
|
|
|
|
# NOTE: want to restart here rather than notify and do it later, so
|
|
# that we don't go on without the config correct.
|
|
- name: Restart crio to pickup changes # noqa no-handler
|
|
service:
|
|
name: crio
|
|
state: restarted
|
|
become: yes
|
|
when: _crio_conf_updated.changed
|