From 44d0816ecd1e55b98e4e76361072667c2ffdae40 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Fri, 7 Oct 2016 16:12:59 -0400 Subject: Improve how we handle containerized node failure on first startup --- roles/openshift_node/tasks/main.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'roles') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index be07bd2d3..8e9c9f511 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -152,17 +152,9 @@ - name: Start and enable node service: name={{ openshift.common.service_type }}-node enabled=yes state=started register: node_start_result - ignore_errors: yes - -- name: Wait 30 seconds for docker initialization whenever node has failed - pause: - seconds: 30 - when: node_start_result | failed - -- name: Start and enable node again - service: name={{ openshift.common.service_type }}-node enabled=yes state=started - register: node_start_result - when: node_start_result | failed + until: not node_start_result | failed + retries: 1 + delay: 30 - set_fact: node_service_status_changed: "{{ node_start_result | changed }}" -- cgit v1.2.3 From ebef73fe94a0329011ca35ba33272789826ce282 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Mon, 10 Oct 2016 09:43:15 -0400 Subject: Apply same pattern to HA master services --- roles/openshift_master/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'roles') diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 645871ab4..1a59717c7 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -213,6 +213,9 @@ state: started when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname == openshift_master_hosts[0] register: start_result + until: not start_result | failed + retries: 1 + delay: 60 - set_fact: master_api_service_status_changed: "{{ start_result | changed }}" @@ -229,6 +232,9 @@ state: started when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname != openshift_master_hosts[0] register: start_result + until: not start_result | failed + retries: 1 + delay: 60 - set_fact: master_api_service_status_changed: "{{ start_result | changed }}" @@ -262,6 +268,9 @@ state: started when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname == openshift_master_hosts[0] register: start_result + until: not start_result | failed + retries: 1 + delay: 60 - pause: seconds: 15 @@ -274,6 +283,9 @@ state: started when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname != openshift_master_hosts[0] register: start_result + until: not start_result | failed + retries: 1 + delay: 60 - set_fact: master_controllers_service_status_changed: "{{ start_result | changed }}" -- cgit v1.2.3