summaryrefslogtreecommitdiffstats
path: root/roles/docker
diff options
context:
space:
mode:
authorLuke Meyer <lmeyer@redhat.com>2017-11-28 15:46:50 -0500
committerLuke Meyer <lmeyer@redhat.com>2017-11-30 16:45:20 -0500
commitfbb4e1ca73fd39ce9f18fa7c6f05766ccb0e484a (patch)
tree12ebe3c443f4f0a0af48a7afd2831d2f5dfb7b1c /roles/docker
parentfdf3edec3f880d21e19e2007065be3ed0ed59a13 (diff)
downloadopenshift-fbb4e1ca73fd39ce9f18fa7c6f05766ccb0e484a.tar.gz
openshift-fbb4e1ca73fd39ce9f18fa7c6f05766ccb0e484a.tar.bz2
openshift-fbb4e1ca73fd39ce9f18fa7c6f05766ccb0e484a.tar.xz
openshift-fbb4e1ca73fd39ce9f18fa7c6f05766ccb0e484a.zip
retry package operations
When a package install/update fails due to network blips or other spotty availability, retry it. If the failure is a real failure (e.g. package is really not there) it still fails after 3 tries (Ansible default).
Diffstat (limited to 'roles/docker')
-rw-r--r--roles/docker/tasks/package_docker.yml2
-rw-r--r--roles/docker/tasks/systemcontainer_crio.yml6
-rw-r--r--roles/docker/tasks/systemcontainer_docker.yml8
3 files changed, 16 insertions, 0 deletions
diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml
index 5437275a2..044b04478 100644
--- a/roles/docker/tasks/package_docker.yml
+++ b/roles/docker/tasks/package_docker.yml
@@ -37,6 +37,8 @@
- name: Install Docker
package: name=docker{{ '-' + docker_version if docker_version is defined else '' }} state=present
when: not openshift.common.is_atomic | bool and not curr_docker_version | skipped and not curr_docker_version.stdout != ''
+ register: result
+ until: result | success
- block:
# Extend the default Docker service unit file when using iptables-services
diff --git a/roles/docker/tasks/systemcontainer_crio.yml b/roles/docker/tasks/systemcontainer_crio.yml
index 17800d4e5..3439aa353 100644
--- a/roles/docker/tasks/systemcontainer_crio.yml
+++ b/roles/docker/tasks/systemcontainer_crio.yml
@@ -29,6 +29,8 @@
name: container-selinux
state: present
when: not openshift.common.is_atomic | bool
+ register: result
+ until: result | success
- name: Check we are not using node as a Docker container with CRI-O
fail: msg='Cannot use CRI-O with node configured as a Docker container'
@@ -42,6 +44,8 @@
name: atomic
state: present
when: not openshift.common.is_atomic | bool
+ register: result
+ until: result | success
# At the time of writing the atomic command requires runc for it's own use. This
# task is here in the even that the atomic package ever removes the dependency.
@@ -50,6 +54,8 @@
name: runc
state: present
when: not openshift.common.is_atomic | bool
+ register: result
+ until: result | success
- name: Check that overlay is in the kernel
diff --git a/roles/docker/tasks/systemcontainer_docker.yml b/roles/docker/tasks/systemcontainer_docker.yml
index f69acb9a5..881d83f50 100644
--- a/roles/docker/tasks/systemcontainer_docker.yml
+++ b/roles/docker/tasks/systemcontainer_docker.yml
@@ -34,6 +34,8 @@
name: container-selinux
state: present
when: not openshift.common.is_atomic | bool
+ register: result
+ until: result | success
# Used to pull and install the system container
- name: Ensure atomic is installed
@@ -41,6 +43,8 @@
name: atomic
state: present
when: not openshift.common.is_atomic | bool
+ register: result
+ until: result | success
# At the time of writing the atomic command requires runc for it's own use. This
# task is here in the even that the atomic package ever removes the dependency.
@@ -49,11 +53,15 @@
name: runc
state: present
when: not openshift.common.is_atomic | bool
+ register: result
+ until: result | success
# Make sure Docker is installed so we are able to use the client
- name: Install Docker so we can use the client
package: name=docker{{ '-' + docker_version if docker_version is defined else '' }} state=present
when: not openshift.common.is_atomic | bool
+ register: result
+ until: result | success
# Make sure docker is disabled. Errors are ignored.
- name: Disable Docker