summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-11-28 21:02:54 -0500
committerGitHub <noreply@github.com>2017-11-28 21:02:54 -0500
commitb7af6f115dd73cb7706fd76cd13fcd63aead7630 (patch)
treed56a1ca453b7be8191f883478f8be9d1ff105944
parentbc77099615299390638a69adcf96c0a67c5e5275 (diff)
parent8ff6f015e2e4ab10063d5d76ef0a454466b818a9 (diff)
downloadopenshift-b7af6f115dd73cb7706fd76cd13fcd63aead7630.tar.gz
openshift-b7af6f115dd73cb7706fd76cd13fcd63aead7630.tar.bz2
openshift-b7af6f115dd73cb7706fd76cd13fcd63aead7630.tar.xz
openshift-b7af6f115dd73cb7706fd76cd13fcd63aead7630.zip
Merge pull request #6073 from mjudeikis/fix_glusterfs_restart
fix for Gluster force restart
-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: