From 38d3b9ea455a737ecf993f606a987ea080ed1cf6 Mon Sep 17 00:00:00 2001 From: iamejboy Date: Thu, 23 Aug 2018 04:17:32 +0000 Subject: [PATCH 1/2] drain: continue cluster check only for response 200 --- jobs/mysql/templates/drain.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/mysql/templates/drain.sh b/jobs/mysql/templates/drain.sh index 457a1047..a8a4d39c 100644 --- a/jobs/mysql/templates/drain.sh +++ b/jobs/mysql/templates/drain.sh @@ -26,7 +26,7 @@ for NODE in "${CLUSTER_NODES[@]}"; do set +e status_code=$(curl -s -o "/dev/null" -w "%{http_code}" "$NODE:$GALERA_HEALTHCHECK_PORT") set -e - if [[ $status_code -eq 000 || $status_code -eq 200 ]]; then + if [ $status_code -eq 200 ]; then continue else echo "$(date): galera heathcheck returned $status_code; drain failed on node ${NODE}" >> "${LOG_DIR}/drain.err.log" From 70b2b5d6c873c899f67655a7dc90c086bbb6f2b5 Mon Sep 17 00:00:00 2001 From: iamejboy Date: Thu, 23 Aug 2018 04:20:22 +0000 Subject: [PATCH 2/2] spec: also use --skip-drain when scaling down --- jobs/mysql/spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/mysql/spec b/jobs/mysql/spec index f4219669..184c27e2 100644 --- a/jobs/mysql/spec +++ b/jobs/mysql/spec @@ -84,7 +84,7 @@ properties: description: 'Maximum total number of database connections for the node' default: 1500 cf_mysql.mysql.enable_drain_healthcheck: - description: 'When this is enabled, the --skip-drain flag is required in order to delete a deployment. Drain healthcheck cannot be enabled when using the arbitrator. Enabling this ensures mysql nodes will verify the health of all other nodes before draining.' + description: 'When this is enabled, the --skip-drain flag is required in order to delete a deployment and scaling down of instances. Drain healthcheck cannot be enabled when using the arbitrator. Enabling this ensures mysql nodes will verify the health of all other nodes before draining.' default: false cf_mysql.mysql.tls.ca_certificate: description: 'CA Certificate which signed the server certificate'