90332e6439
This reverts *parts* of commit 9519fafd10
.
Specifically, this reverts the main fix regarding DOCKER_MIN_API_VERSION.
Reason for revert: Docker 26.0.0 is out, which drops the old API
This patch additionally modifies the Zuul config in two ways:
* disables buildset-registry jobs because they are children of
opendev-buildset-registry (a base-job in opendev) and thus
do not pick up new changes - they are reenabled in a followup
* disables crio jobs because they have their repo seemingly broken
Change-Id: I4d05f9b187f9e40c3dcb2597e08c5bb50c261b17
Co-Authored-By: Radosław Piliszek <radek@piliszek.it>
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
---
|
|
|
|
- name: Ensure "docker" group exists
|
|
group:
|
|
name: "{{ docker_group }}"
|
|
state: present
|
|
|
|
- name: Add user to docker group
|
|
user:
|
|
name: "{{ ansible_user }}"
|
|
groups:
|
|
- "{{ docker_group }}"
|
|
append: yes
|
|
|
|
- name: Update docker daemon proxy configuration
|
|
when: docker_userland_proxy is defined
|
|
include_role:
|
|
name: update-json-file
|
|
vars:
|
|
update_json_file_name: /etc/docker/daemon.json
|
|
update_json_file_combine:
|
|
userland-proxy: "{{ docker_userland_proxy }}"
|
|
update_json_file_become: true
|
|
|
|
# Docker defaults to a MTU of 1500, which causes problems when the
|
|
# main interface has a MTU less than that. Cloud environments often
|
|
# have this, one good example is OpenDev's Linaro ARM64 cloud.
|
|
# https://storyboard.openstack.org/#!/story/2008230
|
|
- name: Lower default MTU
|
|
when: ansible_default_ipv4.mtu < 1500
|
|
include_role:
|
|
name: update-json-file
|
|
vars:
|
|
update_json_file_name: /etc/docker/daemon.json
|
|
update_json_file_combine:
|
|
mtu: 1400
|
|
update_json_file_become: true
|
|
|
|
- name: Get the status of the docket.socket unit
|
|
command: systemctl is-failed docker.socket # noqa command-instead-of-module
|
|
failed_when: false
|
|
become: true
|
|
register: _docker_socket_status
|
|
|
|
- name: Get the status of the docket unit
|
|
command: systemctl is-failed docker # noqa command-instead-of-module
|
|
failed_when: false
|
|
become: true
|
|
register: _docker_status
|
|
|
|
- name: Restart docker
|
|
when: >-
|
|
(docker_userland_proxy is defined) or
|
|
(ansible_default_ipv4.mtu < 1500) or
|
|
(_docker_socket_status.stdout != 'active') or
|
|
(_docker_socket_status.stdout != 'active')
|
|
debug:
|
|
msg: 'Trigger a Docker restart'
|
|
changed_when: true
|
|
notify: Restart docker
|
|
|
|
- name: Reset ssh connection to pick up docker group
|
|
meta: reset_connection
|