From 59b28a68019bf2e4d391091733951753938b1635 Mon Sep 17 00:00:00 2001 From: jjaferson Date: Wed, 11 Mar 2020 10:45:44 +0000 Subject: [PATCH] fix: fails backup on permissions error --- image/tools/lib/component/enmasse_pv.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/image/tools/lib/component/enmasse_pv.sh b/image/tools/lib/component/enmasse_pv.sh index 5c64b83..5eb68ff 100644 --- a/image/tools/lib/component/enmasse_pv.sh +++ b/image/tools/lib/component/enmasse_pv.sh @@ -20,7 +20,12 @@ function component_dump_data { fi local archive_path="$1/archives" local dump_dest="/tmp/enmasse-data" - local pods=$(get_broker_pods) + local pods=$(get_broker_pods 2>&1) + + if [[ "$pods" == *"Error from server"* ]]; then + echo ${pods} + exit 1 + fi if [ "${#pods}" -eq "0" ]; then timestamp_echo "No broker pods found to backup"