summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMangirdas <m.judeikis@gmail.com>2017-11-19 18:18:03 +0000
committerMangirdas <m.judeikis@gmail.com>2017-11-19 18:28:42 +0000
commit8ff6f015e2e4ab10063d5d76ef0a454466b818a9 (patch)
treefa728d44669c9e91fa43e33d0179c2453bbcf8e8
parent71ac647d479768a1e3097a3dde02b9707d175a38 (diff)
downloadopenshift-8ff6f015e2e4ab10063d5d76ef0a454466b818a9.tar.gz
openshift-8ff6f015e2e4ab10063d5d76ef0a454466b818a9.tar.bz2
openshift-8ff6f015e2e4ab10063d5d76ef0a454466b818a9.tar.xz
openshift-8ff6f015e2e4ab10063d5d76ef0a454466b818a9.zip
Add check for gluterFS DS to stop restarts
-rw-r--r--roles/openshift_storage_glusterfs/tasks/glusterfs_deploy.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_deploy.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_deploy.yml
index ef37762f9..30e83e79b 100644
--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_deploy.yml
+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_deploy.yml
@@ -77,6 +77,14 @@
files:
- "{{ mktemp.stdout }}/glusterfs-template.yml"
+- name: Check GlusterFS DaemonSet status
+ oc_obj:
+ namespace: "{{ glusterfs_namespace }}"
+ kind: daemonset
+ name: glusterfs-{{ glusterfs_name }}
+ state: list
+ register: glusterfs_ds
+
- name: Deploy GlusterFS pods
oc_process:
namespace: "{{ glusterfs_namespace }}"
@@ -88,6 +96,8 @@
NODE_LABELS: "{{ glusterfs_nodeselector }}"
CLUSTER_NAME: "{{ glusterfs_name }}"
GB_GLFS_LRU_COUNT: "{{ glusterfs_block_host_vol_max }}"
+ when: (glusterfs_ds.results.results[0].status is not defined) or
+ (glusterfs_ds.results.results[0].status.numberReady | default(0) < glusterfs_ds.results.results[0].status.desiredNumberScheduled | default(glusterfs_nodes | count))
- name: Wait for GlusterFS pods
oc_obj: