diff options
author | Eric Wolinetz <ewolinet@redhat.com> | 2018-01-16 10:45:39 -0600 |
---|---|---|
committer | Eric Wolinetz <ewolinet@redhat.com> | 2018-01-16 10:45:39 -0600 |
commit | 4d96cbb81d758af87da6ef547aa655afcbc9995d (patch) | |
tree | b59da81080cb1678add425030c671f4982b5689f /roles/openshift_logging_elasticsearch/tasks/restart_cluster.yml | |
parent | 0d59a0868971e7f038b775adef024a8f324ab010 (diff) | |
download | openshift-4d96cbb81d758af87da6ef547aa655afcbc9995d.tar.gz openshift-4d96cbb81d758af87da6ef547aa655afcbc9995d.tar.bz2 openshift-4d96cbb81d758af87da6ef547aa655afcbc9995d.tar.xz openshift-4d96cbb81d758af87da6ef547aa655afcbc9995d.zip |
Ensure we are running oc execs against running pods
Diffstat (limited to 'roles/openshift_logging_elasticsearch/tasks/restart_cluster.yml')
-rw-r--r-- | roles/openshift_logging_elasticsearch/tasks/restart_cluster.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/openshift_logging_elasticsearch/tasks/restart_cluster.yml b/roles/openshift_logging_elasticsearch/tasks/restart_cluster.yml index d55beec86..6bce13d1d 100644 --- a/roles/openshift_logging_elasticsearch/tasks/restart_cluster.yml +++ b/roles/openshift_logging_elasticsearch/tasks/restart_cluster.yml @@ -19,7 +19,7 @@ ## get all pods for the cluster - command: > - oc get pod -l component={{ _cluster_component }},provider=openshift -n {{ openshift_logging_elasticsearch_namespace }} -o jsonpath={.items[*].metadata.name} + oc get pod -l component={{ _cluster_component }},provider=openshift -n {{ openshift_logging_elasticsearch_namespace }} -o jsonpath={.items[?(@.status.phase==\"Running\")].metadata.name} register: _cluster_pods - name: "Disable shard balancing for logging-{{ _cluster_component }} cluster" @@ -64,7 +64,7 @@ ## we may need a new first pod to run against -- fetch them all again - command: > - oc get pod -l component={{ _cluster_component }},provider=openshift -n {{ openshift_logging_elasticsearch_namespace }} -o jsonpath={.items[*].metadata.name} + oc get pod -l component={{ _cluster_component }},provider=openshift -n {{ openshift_logging_elasticsearch_namespace }} -o jsonpath={.items[?(@.status.phase==\"Running\")].metadata.name} register: _cluster_pods - name: "Enable shard balancing for logging-{{ _cluster_component }} cluster" |