summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-10-30 10:47:03 -0400
committerMichael Gugino <mgugino@redhat.com>2017-10-30 10:47:03 -0400
commitfac20bb529215737014ab47b8e0aeaa64f88c7a6 (patch)
treeda2e7b7a0fe9aaed15f72ea957416424b0288e64 /roles
parent2d0365bfabc225dcb91a0df9f37ecda2bd606602 (diff)
downloadopenshift-fac20bb529215737014ab47b8e0aeaa64f88c7a6.tar.gz
openshift-fac20bb529215737014ab47b8e0aeaa64f88c7a6.tar.bz2
openshift-fac20bb529215737014ab47b8e0aeaa64f88c7a6.tar.xz
openshift-fac20bb529215737014ab47b8e0aeaa64f88c7a6.zip
Add retry logic to docker auth credentials
This commit enables retry on docker login commands. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1506931
Diffstat (limited to 'roles')
-rw-r--r--roles/docker/tasks/registry_auth.yml4
-rw-r--r--roles/openshift_master/tasks/registry_auth.yml3
-rw-r--r--roles/openshift_node/tasks/registry_auth.yml3
-rw-r--r--roles/openshift_node_upgrade/tasks/registry_auth.yml3
4 files changed, 13 insertions, 0 deletions
diff --git a/roles/docker/tasks/registry_auth.yml b/roles/docker/tasks/registry_auth.yml
index 65ed60efa..d05b7f2b8 100644
--- a/roles/docker/tasks/registry_auth.yml
+++ b/roles/docker/tasks/registry_auth.yml
@@ -7,6 +7,10 @@
- name: Create credentials for docker cli registry auth
command: "docker --config={{ docker_cli_auth_config_path }} login -u {{ oreg_auth_user }} -p {{ oreg_auth_password }} {{ oreg_host }}"
+ register: openshift_docker_credentials_create_res
+ retries: 3
+ delay: 5
+ until: openshift_docker_credentials_create_res.rc == 0
when:
- oreg_auth_user is defined
- (not docker_cli_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool
diff --git a/roles/openshift_master/tasks/registry_auth.yml b/roles/openshift_master/tasks/registry_auth.yml
index 63d483760..cde01c49e 100644
--- a/roles/openshift_master/tasks/registry_auth.yml
+++ b/roles/openshift_master/tasks/registry_auth.yml
@@ -11,6 +11,9 @@
- oreg_auth_user is defined
- (not master_oreg_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool
register: master_oreg_auth_credentials_create
+ retries: 3
+ delay: 5
+ until: master_oreg_auth_credentials_create.rc == 0
notify:
- restart master api
- restart master controllers
diff --git a/roles/openshift_node/tasks/registry_auth.yml b/roles/openshift_node/tasks/registry_auth.yml
index de396fb4b..5e5e4f94a 100644
--- a/roles/openshift_node/tasks/registry_auth.yml
+++ b/roles/openshift_node/tasks/registry_auth.yml
@@ -11,6 +11,9 @@
- oreg_auth_user is defined
- (not node_oreg_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool
register: node_oreg_auth_credentials_create
+ retries: 3
+ delay: 5
+ until: node_oreg_auth_credentials_create.rc == 0
notify:
- restart node
diff --git a/roles/openshift_node_upgrade/tasks/registry_auth.yml b/roles/openshift_node_upgrade/tasks/registry_auth.yml
index de396fb4b..5e5e4f94a 100644
--- a/roles/openshift_node_upgrade/tasks/registry_auth.yml
+++ b/roles/openshift_node_upgrade/tasks/registry_auth.yml
@@ -11,6 +11,9 @@
- oreg_auth_user is defined
- (not node_oreg_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool
register: node_oreg_auth_credentials_create
+ retries: 3
+ delay: 5
+ until: node_oreg_auth_credentials_create.rc == 0
notify:
- restart node