Override DOCKER_MIN_API_VERSION for skopeo when installing docker
Skopeo hardcoded the docker api version for image manipulation to version 1.22 of the api until very recently. Docker 25 sets 1.24 as a minimum version by default introducing an incompatibility between the tools. It isn't straightforward to install an updated skopeo everywhere we need it (due to golang requirements). As a workaround we override the min version to 1.22 when installing the docker daemon. This should work until Docker 26 is released and removed the override option. Note we also pin microk8s from latest/stable (which is currently 1.29/stable) to 1.28/stable to workaround https://github.com/canonical/microk8s/issues/4361. This is necessary to get the CI jobs for docker/registry/k8s testing working in order to land this fixup. Change-Id: I377ac84d532749eba578c4b32eb2ed6a5ce7a0c9
This commit is contained in:
parent
e3006463aa
commit
9519fafd10
@ -1,4 +1,9 @@
|
||||
---
|
||||
- name: Reload systemd
|
||||
become: true
|
||||
systemd_service:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Stop docker.socket to avoid any conflict
|
||||
become: true
|
||||
service:
|
||||
|
@ -48,6 +48,32 @@
|
||||
become: true
|
||||
register: _docker_status
|
||||
|
||||
- name: Dir for docker systemd overrides
|
||||
file:
|
||||
path: /etc/systemd/system/docker.service.d/
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
become: true
|
||||
|
||||
# Skopeo hardcoded protocol version 1.22 until ~February 2024.
|
||||
# Docker supports the MIN version override until Docker 26 releases.
|
||||
# https://github.com/docker/cli/blob/master/docs/deprecated.md#deprecate-legacy-api-versions
|
||||
- name: Override the docker daemon image protocol min version
|
||||
copy:
|
||||
dest: /etc/systemd/system/docker.service.d/image_protocol_env.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
content: |
|
||||
[Service]
|
||||
Environment="DOCKER_MIN_API_VERSION=1.22"
|
||||
become: true
|
||||
notify:
|
||||
- Reload systemd
|
||||
- Restart docker
|
||||
|
||||
- name: Restart docker
|
||||
when: >-
|
||||
(docker_userland_proxy is defined) or
|
||||
|
@ -1,5 +1,7 @@
|
||||
ensure_kubernetes_type: minikube
|
||||
ensure_kubernetes_microk8s_channel: 'latest/stable'
|
||||
# Pin to 1.28 until https://github.com/canonical/microk8s/issues/4361
|
||||
# is fixed.
|
||||
ensure_kubernetes_microk8s_channel: '1.28/stable'
|
||||
# NOTE(ianw) : 2022-12-13
|
||||
# - "storage" is deprecated and has become "hostpath-storage" in
|
||||
# >1.24, but we still need to support 1.23. If it really goes away
|
||||
|
@ -352,6 +352,7 @@
|
||||
- roles/run-buildset-registry/.*
|
||||
- roles/use-buildset-registry/.*
|
||||
- test-playbooks/registry/.*
|
||||
- zuul-tests.d/container-roles-jobs.yaml
|
||||
pre-run: test-playbooks/registry/buildset-registry-pre.yaml
|
||||
run: test-playbooks/registry/buildset-registry.yaml
|
||||
post-run: test-playbooks/registry/test-registry-post.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user