summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-07-06 11:28:26 -0400
committerScott Dodson <sdodson@redhat.com>2017-07-18 12:03:15 -0400
commit36a7c5bf5c69511020c516a33ca6b3e57aff485d (patch)
treee7633582e1ad116512a45fcd47b5e5656409ab0e
parent4a38bc1bbcb743d94a481c539ccd723efe436da0 (diff)
downloadopenshift-36a7c5bf5c69511020c516a33ca6b3e57aff485d.tar.gz
openshift-36a7c5bf5c69511020c516a33ca6b3e57aff485d.tar.bz2
openshift-36a7c5bf5c69511020c516a33ca6b3e57aff485d.tar.xz
openshift-36a7c5bf5c69511020c516a33ca6b3e57aff485d.zip
Add retries to node restart handlers
-rw-r--r--roles/openshift_node/handlers/main.yml8
-rw-r--r--roles/openshift_node_upgrade/handlers/main.yml12
2 files changed, 17 insertions, 3 deletions
diff --git a/roles/openshift_node/handlers/main.yml b/roles/openshift_node/handlers/main.yml
index a6bd12d4e..0d4af9f53 100644
--- a/roles/openshift_node/handlers/main.yml
+++ b/roles/openshift_node/handlers/main.yml
@@ -15,7 +15,13 @@
systemd:
name: "{{ openshift.common.service_type }}-node"
state: restarted
- when: (not skip_node_svc_handlers | default(False) | bool) and not (node_service_status_changed | default(false) | bool)
+ register: l_openshift_node_restart_node_result
+ until: not l_openshift_node_restart_node_result | failed
+ retries: 3
+ delay: 30
+ when:
+ - (not skip_node_svc_handlers | default(False) | bool)
+ - not (node_service_status_changed | default(false) | bool)
- name: reload sysctl.conf
command: /sbin/sysctl -p
diff --git a/roles/openshift_node_upgrade/handlers/main.yml b/roles/openshift_node_upgrade/handlers/main.yml
index cb51416d4..c636f6fa3 100644
--- a/roles/openshift_node_upgrade/handlers/main.yml
+++ b/roles/openshift_node_upgrade/handlers/main.yml
@@ -10,5 +10,13 @@
when: (not skip_node_svc_handlers | default(False) | bool) and openshift.common.is_containerized | bool
- name: restart node
- systemd: name={{ openshift.common.service_type }}-node state=restarted
- when: (not skip_node_svc_handlers | default(False) | bool) and not (node_service_status_changed | default(false) | bool)
+ systemd:
+ name: "{{ openshift.common.service_type }}-node"
+ state: restarted
+ register: l_openshift_node_upgrade_restart_node_result
+ until: not l_openshift_node_upgrade_restart_node_result | failed
+ retries: 3
+ delay: 30
+ when:
+ - (not skip_node_svc_handlers | default(False) | bool)
+ - not (node_service_status_changed | default(false) | bool)