diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-10-10 10:33:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-10 10:33:03 -0400 |
commit | 5e07a172850ab6d8701fd4fc3a08a3414ecd37dd (patch) | |
tree | 533df5e3391a70cd27662af1e6358afc3cba36c0 | |
parent | c5e95907b6311935a5fa7e56b2f00565b32e4fb6 (diff) | |
parent | ebef73fe94a0329011ca35ba33272789826ce282 (diff) | |
download | openshift-5e07a172850ab6d8701fd4fc3a08a3414ecd37dd.tar.gz openshift-5e07a172850ab6d8701fd4fc3a08a3414ecd37dd.tar.bz2 openshift-5e07a172850ab6d8701fd4fc3a08a3414ecd37dd.tar.xz openshift-5e07a172850ab6d8701fd4fc3a08a3414ecd37dd.zip |
Merge pull request #2571 from sdodson/node-retry-improvement
Retry starting master and node services once
-rw-r--r-- | roles/openshift_master/tasks/main.yml | 12 | ||||
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 14 |
2 files changed, 15 insertions, 11 deletions
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 }}" 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 }}" |