Enable load balancing to Galera nodes in Donor state

We use the wsrep_notify.sh script to notify changes in Galera cluster
membership to haproxy. When xtrabackup was used for the state transfer,
nodes in the Donor state would be included in the backend pool. However,
since the switch to mariabackup in the Stein cycle, we now remove nodes
in the Donor state from the backend pool.

This change ensures that nodes in the Donor state are included in the
backend pool when the SST method is either xtrabackup or mariabackup.

https://galeracluster.com/library/documentation/mysql-wsrep-options.html#wsrep-notify-cmd

Change-Id: Ide4301779a0d221ae5d4dbdd4873fb8a40eb7297
Co-authored-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Closes-Bug: #1850945
This commit is contained in:
Mark Goddard 2019-11-01 15:17:48 +00:00 committed by Radosław Piliszek
parent 1f1f01f27f
commit f6e8478b61

View File

@ -57,7 +57,11 @@ Synced)
Donor)
# enabling donor only if xtrabackup configured
SST_METHOD=`get_sst_method`
[[ $SST_METHOD =~ 'xtrabackup' ]] && CMD=$ENABLE_LB || CMD=$DISABLE_LB
if [[ $SST_METHOD =~ (mariabackup|xtrabackup) ]]; then
CMD=$ENABLE_LB
else
CMD=$DISABLE_LB
fi
;;
Undefined)
# shutting down database: do nothing