openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab...@apache.org
Subject [incubator-openwhisk] branch master updated: add until for all ansible retries (#3806)
Date Fri, 29 Jun 2018 23:30:58 GMT
This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new b1476b9  add until for all ansible retries (#3806)
b1476b9 is described below

commit b1476b9992bab90c077ac2f1fbdc67d10d9d2c39
Author: Carlos Santana <csantanapr@apache.org>
AuthorDate: Fri Jun 29 19:30:54 2018 -0400

    add until for all ansible retries (#3806)
---
 ansible/roles/apigateway/tasks/deploy.yml |  2 --
 ansible/roles/controller/tasks/deploy.yml |  6 +++---
 ansible/roles/couchdb/tasks/deploy.yml    |  2 --
 ansible/roles/invoker/tasks/deploy.yml    | 15 +++++++++------
 ansible/roles/kafka/tasks/deploy.yml      |  2 --
 ansible/roles/nginx/tasks/deploy.yml      |  2 ++
 ansible/roles/redis/tasks/deploy.yml      |  2 ++
 ansible/roles/registry/tasks/deploy.yml   |  2 ++
 ansible/roles/zookeeper/tasks/deploy.yml  |  2 ++
 9 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/ansible/roles/apigateway/tasks/deploy.yml b/ansible/roles/apigateway/tasks/deploy.yml
index 69a116a..ff1973b 100644
--- a/ansible/roles/apigateway/tasks/deploy.yml
+++ b/ansible/roles/apigateway/tasks/deploy.yml
@@ -20,8 +20,6 @@
       - "{{ apigateway.port.mgmt }}:8080"
       - "{{ apigateway.port.api }}:9000"
     pull: "{{ apigateway_local_build is undefined }}"
-  retries: "{{ docker.pull.retries }}"
-  delay: "{{ docker.pull.delay }}"
 
 - name: wait until the API Gateway in this host is up and running
   uri:
diff --git a/ansible/roles/controller/tasks/deploy.yml b/ansible/roles/controller/tasks/deploy.yml
index 2d48c4f..8d18931 100644
--- a/ansible/roles/controller/tasks/deploy.yml
+++ b/ansible/roles/controller/tasks/deploy.yml
@@ -13,10 +13,10 @@
       "{{ (controller_index_base|int) + host_group.index(inventory_hostname) }}"
 
 - name: "pull the {{ docker.image.tag }} image of controller"
-  shell:
-    docker pull
-    {{ docker_registry~docker.image.prefix }}/controller:{{docker.image.tag}}
+  shell: "docker pull {{docker_registry}}{{ docker.image.prefix }}/controller:{{docker.image.tag}}"
   when: docker_registry != ""
+  register: result
+  until: (result.rc == 0)
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 
diff --git a/ansible/roles/couchdb/tasks/deploy.yml b/ansible/roles/couchdb/tasks/deploy.yml
index b59c23d..a4365fb 100644
--- a/ansible/roles/couchdb/tasks/deploy.yml
+++ b/ansible/roles/couchdb/tasks/deploy.yml
@@ -42,8 +42,6 @@
       COUCHDB_PASSWORD: "{{ db_password }}"
       NODENAME: "{{ ansible_host }}"
     pull: "{{ couchdb.pull_couchdb | default(true) }}"
-  retries: "{{ docker.pull.retries }}"
-  delay: "{{ docker.pull.delay }}"
 
 - name: wait until CouchDB in this host is up and running
   uri:
diff --git a/ansible/roles/invoker/tasks/deploy.yml b/ansible/roles/invoker/tasks/deploy.yml
index 2444bc5..d7afdce 100644
--- a/ansible/roles/invoker/tasks/deploy.yml
+++ b/ansible/roles/invoker/tasks/deploy.yml
@@ -6,10 +6,10 @@
 - import_tasks: docker_login.yml
 
 - name: "pull invoker image with tag {{docker.image.tag}}"
-  shell: "docker pull {{docker_registry}}{{item}}:{{docker.image.tag}}"
-  with_items:
-    - '{{ docker.image.prefix }}/invoker'
+  shell: "docker pull {{docker_registry}}{{ docker.image.prefix }}/invoker:{{docker.image.tag}}"
   when: docker_registry != ""
+  register: result
+  until: (result.rc == 0)
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 
@@ -22,8 +22,10 @@
 #
 - name: "pull runtime action images per manifest"
   shell: "docker pull {{runtimes_registry | default()}}{{item.prefix}}/{{item.name}}:{{item.tag
| default()}}"
-  with_items: "{{ runtimesManifest.runtimes.values() | sum(start=[]) | selectattr('deprecated',
'equalto',false)  | map(attribute='image') | list | unique }}"
+  loop: "{{ runtimesManifest.runtimes.values() | sum(start=[]) | selectattr('deprecated',
'equalto',false)  | map(attribute='image') | list | unique }}"
   when: skip_pull_runtimes is not defined or skip_pull_runtimes != True
+  register: result
+  until: (result.rc == 0)
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 
@@ -32,9 +34,10 @@
 #
 - name: "pull blackboxes action images per manifest"
   shell: "docker pull {{runtimes_registry | default()}}{{item.prefix}}/{{item.name}}:{{item.tag
| default()}}"
-  with_items:
-    - "{{ runtimesManifest.blackboxes }}"
+  loop: "{{ runtimesManifest.blackboxes }}"
   when: skip_pull_runtimes is not defined or skip_pull_runtimes != True
+  register: result
+  until: (result.rc == 0)
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 
diff --git a/ansible/roles/kafka/tasks/deploy.yml b/ansible/roles/kafka/tasks/deploy.yml
index a5de38b..8f195fe 100644
--- a/ansible/roles/kafka/tasks/deploy.yml
+++ b/ansible/roles/kafka/tasks/deploy.yml
@@ -84,8 +84,6 @@
     volumes:
       - "{{ config_root_dir }}/kafka/certs:/config"
     pull: true
-  retries: "{{ docker.pull.retries }}"
-  delay: "{{ docker.pull.delay }}"
 
 - name: wait until the kafka server started up
   shell:
diff --git a/ansible/roles/nginx/tasks/deploy.yml b/ansible/roles/nginx/tasks/deploy.yml
index c0d7399..2812051 100644
--- a/ansible/roles/nginx/tasks/deploy.yml
+++ b/ansible/roles/nginx/tasks/deploy.yml
@@ -47,6 +47,8 @@
 
 - name: "pull the nginx:{{ nginx.version }} image"
   shell: "docker pull nginx:{{ nginx.version }}"
+  register: result
+  until: (result.rc == 0)
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 
diff --git a/ansible/roles/redis/tasks/deploy.yml b/ansible/roles/redis/tasks/deploy.yml
index e48c92c..31b47e6 100644
--- a/ansible/roles/redis/tasks/deploy.yml
+++ b/ansible/roles/redis/tasks/deploy.yml
@@ -5,6 +5,8 @@
 
 - name: "pull the redis:{{ redis.version }} image"
   shell: "docker pull redis:{{ redis.version }}"
+  register: result
+  until: (result.rc == 0)
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 
diff --git a/ansible/roles/registry/tasks/deploy.yml b/ansible/roles/registry/tasks/deploy.yml
index ba016b2..ca40964 100644
--- a/ansible/roles/registry/tasks/deploy.yml
+++ b/ansible/roles/registry/tasks/deploy.yml
@@ -5,6 +5,8 @@
 
 - name: "pull the {{ registry.version }} image of registry"
   shell: "docker pull registry:{{ registry.version }}"
+  register: result
+  until: (result.rc == 0)
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 
diff --git a/ansible/roles/zookeeper/tasks/deploy.yml b/ansible/roles/zookeeper/tasks/deploy.yml
index ea8de82..74c2de8 100644
--- a/ansible/roles/zookeeper/tasks/deploy.yml
+++ b/ansible/roles/zookeeper/tasks/deploy.yml
@@ -5,6 +5,8 @@
 
 - name: "pull the zookeeper:{{ zookeeper.version }} image"
   shell: "docker pull zookeeper:{{ zookeeper.version }}"
+  register: result
+  until: (result.rc == 0)
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 


Mime
View raw message