Przeglądaj źródła

Test docker restart with retries 3 delay 30

Steve Milner 7 lat temu
rodzic
commit
4a38bc1bbc

+ 4 - 0
playbooks/adhoc/uninstall.yml

@@ -325,6 +325,10 @@
     service: name=docker state=restarted
     failed_when: false
     when: not (container_engine | changed)
+    register: l_docker_restart_docker_in_pb_result
+    until: not l_docker_restart_docker_in_pb_result | failed
+    retries: 3
+    delay: 30
 
 - hosts: masters
   become: yes

+ 4 - 0
playbooks/common/openshift-cluster/upgrades/docker/restart.yml

@@ -1,6 +1,10 @@
 ---
 - name: Restart docker
   service: name=docker state=restarted
+  register: l_docker_restart_docker_in_upgrade_result
+  until: not l_docker_restart_docker_in_upgrade_result | failed
+  retries: 3
+  delay: 30
 
 - name: Update docker facts
   openshift_facts:

+ 4 - 0
playbooks/common/openshift-node/restart.yml

@@ -11,6 +11,10 @@
     service:
       name: docker
       state: restarted
+    register: l_docker_restart_docker_in_node_result
+    until: not l_docker_restart_docker_in_node_result | failed
+    retries: 3
+    delay: 30
 
   - name: Update docker facts
     openshift_facts:

+ 4 - 0
roles/calico/handlers/main.yml

@@ -8,3 +8,7 @@
   systemd:
     name: "{{ openshift.docker.service_name }}"
     state: restarted
+  register: l_docker_restart_docker_in_calico_result
+  until: not l_docker_restart_docker_in_calico_result | failed
+  retries: 3
+  delay: 30

+ 4 - 0
roles/contiv/tasks/netplugin.yml

@@ -108,6 +108,10 @@
     name: "{{ openshift.docker.service_name }}"
     state: restarted
   when: docker_updated|changed
+  register: l_docker_restart_docker_in_contiv_result
+  until: not l_docker_restart_docker_in_contiv_result | failed
+  retries: 3
+  delay: 30
 
 - name: Netplugin | Enable Netplugin
   service:

+ 1 - 1
roles/docker/handlers/main.yml

@@ -6,7 +6,7 @@
     state: restarted
   register: r_docker_restart_docker_result
   until: not r_docker_restart_docker_result | failed
-  retries: 1
+  retries: 3
   delay: 30
 
   when: not docker_service_status_changed | default(false) | bool

+ 4 - 0
roles/flannel/handlers/main.yml

@@ -8,3 +8,7 @@
   systemd:
     name: "{{ openshift.docker.service_name }}"
     state: restarted
+  register: l_docker_restart_docker_in_flannel_result
+  until: not l_docker_restart_docker_in_flannel_result | failed
+  retries: 3
+  delay: 30

+ 4 - 0
roles/openshift_node_certificates/handlers/main.yml

@@ -9,3 +9,7 @@
     name: "{{ openshift.docker.service_name }}"
     state: restarted
   when: not openshift_certificates_redeploy | default(false) | bool
+  register: l_docker_restart_docker_in_cert_result
+  until: not l_docker_restart_docker_in_cert_result | failed
+  retries: 3
+  delay: 30

+ 1 - 1
roles/openshift_node_upgrade/tasks/restart.yml

@@ -19,7 +19,7 @@
     state: started
   register: docker_start_result
   until: not docker_start_result | failed
-  retries: 1
+  retries: 3
   delay: 30
 
 - name: Update docker facts