From 17e7dcbb5bbcda3d520cfc404906e3e4df800165 Mon Sep 17 00:00:00 2001 From: Kai Timmer Date: Mon, 11 Nov 2019 16:35:42 +0100 Subject: [PATCH] in retry_until only read the last mongo client line (#18630) Signed-off-by: Kai Timmer --- stable/mongodb-replicaset/Chart.yaml | 2 +- stable/mongodb-replicaset/init/on-start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/mongodb-replicaset/Chart.yaml b/stable/mongodb-replicaset/Chart.yaml index 443653070c..b1b7db1576 100644 --- a/stable/mongodb-replicaset/Chart.yaml +++ b/stable/mongodb-replicaset/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: mongodb-replicaset home: https://github.com/mongodb/mongo -version: 3.10.1 +version: 3.10.2 appVersion: 3.6 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. diff --git a/stable/mongodb-replicaset/init/on-start.sh b/stable/mongodb-replicaset/init/on-start.sh index 010378db3c..072b38c3a1 100644 --- a/stable/mongodb-replicaset/init/on-start.sh +++ b/stable/mongodb-replicaset/init/on-start.sh @@ -51,7 +51,7 @@ retry_until() { creds=() fi - until [[ $(mongo admin --host "${host}" "${creds[@]}" "${ssl_args[@]}" --quiet --eval "${command}") == "${expected}" ]]; do + until [[ $(mongo admin --host "${host}" "${creds[@]}" "${ssl_args[@]}" --quiet --eval "${command}" | tail -n1) == "${expected}" ]]; do sleep 1 if (! ps "${pid}" &>/dev/null); then