summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-07-18 15:10:37 -0400
committerGitHub <noreply@github.com>2017-07-18 15:10:37 -0400
commit8e2be54c6f2f55368f33667a68a5693dc75b1027 (patch)
tree0f63035787dce728f9fa994a2dad78cff5bb9f0c /roles/openshift_node/tasks
parent742203529902ba278c213e326f81f667304b9625 (diff)
parent5a94fe5b074d01a3b16db8a05c47c31e484e5ebe (diff)
downloadopenshift-8e2be54c6f2f55368f33667a68a5693dc75b1027.tar.gz
openshift-8e2be54c6f2f55368f33667a68a5693dc75b1027.tar.bz2
openshift-8e2be54c6f2f55368f33667a68a5693dc75b1027.tar.xz
openshift-8e2be54c6f2f55368f33667a68a5693dc75b1027.zip
Merge pull request #4698 from sdodson/service-retries
Service retries
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r--roles/openshift_node/tasks/main.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 573051504..879f6c207 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -118,8 +118,12 @@
name: openvswitch.service
enabled: yes
state: started
+ daemon_reload: yes
when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool
register: ovs_start_result
+ until: not ovs_start_result | failed
+ retries: 3
+ delay: 30
- set_fact:
ovs_service_status_changed: "{{ ovs_start_result | changed }}"
@@ -212,15 +216,27 @@
state: started
when: openshift.common.is_containerized | bool
+
- name: Start and enable node
systemd:
name: "{{ openshift.common.service_type }}-node"
enabled: yes
state: started
+ daemon_reload: yes
register: node_start_result
until: not node_start_result | failed
retries: 1
delay: 30
+ ignore_errors: true
+
+- name: Dump logs from node service if it failed
+ command: journalctl --no-pager -n 100 {{ openshift.common.service_type }}-node
+ when: node_start_result | failed
+
+- name: Abort if node failed to start
+ fail:
+ msg: Node failed to start please inspect the logs and try again
+ when: node_start_result | failed
- set_fact:
node_service_status_changed: "{{ node_start_result | changed }}"