From a90fe93300f04b1199466e1fa2c0c336e183121c Mon Sep 17 00:00:00 2001 From: Ori Hoch Date: Sun, 24 Mar 2019 10:48:29 +0200 Subject: [PATCH] cca-operator: fix solr create collection to ignore evicted pods (#31) --- cca-operator/update-instance.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cca-operator/update-instance.sh b/cca-operator/update-instance.sh index 7d147c6..4d20782 100755 --- a/cca-operator/update-instance.sh +++ b/cca-operator/update-instance.sh @@ -87,7 +87,7 @@ if [ "${USE_CENTRALIZED_INFRA}" == "1" ]; then | kubectl $KUBECTL_GLOBAL_ARGS --namespace "${INSTANCE_NAMESPACE}" create -f - [ "$?" != "0" ] && exit 1 fi - ! SOLRCLOUD_POD_NAME=$(kubectl -n ckan-cloud get pods -l "app=solr" -o 'jsonpath={.items[0].metadata.name}') && exit 1 + ! SOLRCLOUD_POD_NAME=$(kubectl -n ckan-cloud get pods -l "app=solr" --field-selector 'status.phase=Running' -o 'jsonpath={.items[0].metadata.name}') && exit 1 echo Verifying solrcloud collection ${INSTANCE_NAMESPACE} on solrcloud pod $SOLRCLOUD_POD_NAME in namespace ckan-cloud SOLRCLOUD_COLLECTION_EXISTS=$(kubectl -n ckan-cloud exec $SOLRCLOUD_POD_NAME \ -- curl 'localhost:8983/solr/admin/collections?action=LIST&wt=json' \