File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ set -o nounset
25
25
set -o pipefail
26
26
27
27
KUBE_ROOT=$( dirname " ${BASH_SOURCE} " ) /..
28
+ EXIT_ON_WEAK_ERROR=" ${EXIT_ON_WEAK_ERROR:- true} "
28
29
29
30
if [ -f " ${KUBE_ROOT} /cluster/env.sh" ]; then
30
31
source " ${KUBE_ROOT} /cluster/env.sh"
@@ -47,7 +48,18 @@ echo "... calling kube-up" >&2
47
48
kube-up
48
49
49
50
echo " ... calling validate-cluster" >&2
50
- validate-cluster
51
+ if [[ " ${EXIT_ON_WEAK_ERROR} " == " true" ]]; then
52
+ validate-cluster
53
+ else
54
+ if ! validate-cluster; then
55
+ local validate_result=" $? "
56
+ if [[ " ${validate_result} " == " 1" ]]; then
57
+ exit 1
58
+ elif [[ " ${validate_result} " == " 2" ]]; then
59
+ echo " ...ignoring non-fatal errors in validate-cluster" >&2
60
+ fi
61
+ fi
62
+ fi
51
63
52
64
echo -e " Done, listing cluster services:\n" >&2
53
65
" ${KUBE_ROOT} /cluster/kubectl.sh" cluster-info
Original file line number Diff line number Diff line change @@ -553,6 +553,7 @@ case ${JOB_NAME} in
553
553
NODE_DISK_SIZE=" 50GB"
554
554
NUM_NODES=" 1000"
555
555
ALLOWED_NOTREADY_NODES=" 2"
556
+ EXIT_ON_WEAK_ERROR=" false"
556
557
# Reduce logs verbosity
557
558
TEST_CLUSTER_LOG_LEVEL=" --v=1"
558
559
# Increase resync period to simulate production
@@ -953,6 +954,7 @@ export KUBE_OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-}
953
954
export GCE_SERVICE_ACCOUNT=$( gcloud auth list 2> /dev/null | grep active | cut -f3 -d' ' )
954
955
export FAIL_ON_GCP_RESOURCE_LEAK=" ${FAIL_ON_GCP_RESOURCE_LEAK:- false} "
955
956
export ALLOWED_NOTREADY_NODES=${ALLOWED_NOTREADY_NODES:- }
957
+ export EXIT_ON_WEAK_ERROR=${EXIT_ON_WEAK_ERROR:- }
956
958
957
959
# GKE variables
958
960
export CLUSTER_NAME=${E2E_CLUSTER_NAME}
You can’t perform that action at this time.
0 commit comments