summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2017-01-18 14:41:44 -0500
committerDevan Goodwin <dgoodwin@redhat.com>2017-01-18 14:41:44 -0500
commite2f8543fa8dd405ba144d04ce4df27c876a615ae (patch)
tree806113e7ca21e8633a9c631ded89da064d89bcfc /playbooks
parent2b73c9713cd816a6095e40e10d664eff68c8e206 (diff)
downloadopenshift-e2f8543fa8dd405ba144d04ce4df27c876a615ae.tar.gz
openshift-e2f8543fa8dd405ba144d04ce4df27c876a615ae.tar.bz2
openshift-e2f8543fa8dd405ba144d04ce4df27c876a615ae.tar.xz
openshift-e2f8543fa8dd405ba144d04ce4df27c876a615ae.zip
More reliable wait for master after full host reboot.
This would fail in some environments where openshift.common.hostname was not reachable from the local system running ansible. Additionally it is also possible the API port would not be available even if the host were. Instead we wait for master ssh connection to come back up, then wait for the master API on the remote host just as we do for the "service" style restart.
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/common/openshift-master/restart_hosts.yml17
1 files changed, 12 insertions, 5 deletions
diff --git a/playbooks/common/openshift-master/restart_hosts.yml b/playbooks/common/openshift-master/restart_hosts.yml
index ffa23d26a..832301e3d 100644
--- a/playbooks/common/openshift-master/restart_hosts.yml
+++ b/playbooks/common/openshift-master/restart_hosts.yml
@@ -7,12 +7,19 @@
ignore_errors: true
become: yes
-# Ensure the api_port is available.
-- name: Wait for master API to come back online
- become: no
+- name: Wait for master to restart
local_action:
module: wait_for
- host="{{ openshift.common.hostname }}"
+ host="{{ inventory_hostname }}"
state=started
delay=10
- port="{{ openshift.master.api_port }}"
+ become: no
+
+# Now that ssh is back up we can wait for API on the remote system,
+# avoiding some potential connection issues from local system:
+- name: Wait for master API to come back online
+ wait_for:
+ host: "{{ openshift.common.hostname }}"
+ state: started
+ delay: 10
+ port: "{{ openshift.master.api_port }}"