Skip to content

Commit 44cb27a

Browse files
committed
Stabilize Galera CI and ProxySQL checks
1 parent be076b3 commit 44cb27a

4 files changed

Lines changed: 32 additions & 7 deletions

File tree

.github/workflows/integration_tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ jobs:
272272
sudo apt-get update
273273
sudo apt-get install -y libaio1 libnuma1 libncurses5 socat
274274
275+
- name: Install legacy OpenSSL 1.0
276+
run: |
277+
echo "deb [trusted=yes] http://archive.ubuntu.com/ubuntu bionic-security main" | sudo tee /etc/apt/sources.list.d/bionic-security.list
278+
sudo apt-get update
279+
sudo apt-get install -y libssl1.0.0
280+
275281
- name: Provide LDAP compatibility shim
276282
run: |
277283
sudo ldconfig
@@ -302,7 +308,7 @@ jobs:
302308
URL="https://downloads.percona.com/downloads/Percona-XtraDB-Cluster-LATEST/Percona-XtraDB-Cluster-8.0.27/binary/tarball/$TARBALL"
303309
echo "Downloading Percona XtraDB Cluster ${PXC_VERSION}..."
304310
mkdir -p "$SANDBOX_BINARY"
305-
curl -L -f -o "/tmp/$TARBALL" "$URL"
311+
curl -L -f --retry 5 --retry-all-errors --retry-delay 2 -o "/tmp/$TARBALL" "$URL"
306312
./dbdeployer unpack "/tmp/$TARBALL" --sandbox-binary="$SANDBOX_BINARY"
307313
308314
- name: Test replication deployment
@@ -387,7 +393,7 @@ jobs:
387393
URL="https://archive.mariadb.org/mariadb-${MARIADB_GALERA_VERSION}/bintar-linux-systemd-x86_64/$TARBALL"
388394
echo "Downloading MariaDB Galera ${MARIADB_GALERA_VERSION}..."
389395
mkdir -p "$SANDBOX_BINARY"
390-
curl -L -f -o "/tmp/$TARBALL" "$URL"
396+
curl -L -f --retry 5 --retry-all-errors --retry-delay 2 -o "/tmp/$TARBALL" "$URL"
391397
./dbdeployer unpack "/tmp/$TARBALL" --sandbox-binary="$SANDBOX_BINARY"
392398
393399
- name: Test replication deployment

.github/workflows/proxysql_integration_tests.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ jobs:
181181
sudo apt-get update
182182
sudo apt-get install -y libaio1 libnuma1 libncurses5 libldap-2.5-0 mysql-client socat
183183
184+
- name: Install legacy OpenSSL 1.0
185+
run: |
186+
echo "deb [trusted=yes] http://archive.ubuntu.com/ubuntu bionic-security main" | sudo tee /etc/apt/sources.list.d/bionic-security.list
187+
sudo apt-get update
188+
sudo apt-get install -y libssl1.0.0
189+
184190
- name: Provide LDAP compatibility shim
185191
run: |
186192
sudo ldconfig
@@ -221,7 +227,7 @@ jobs:
221227
TARBALL="Percona-XtraDB-Cluster_${PXC_VERSION}_Linux.x86_64.glibc2.17-minimal.tar.gz"
222228
URL="https://downloads.percona.com/downloads/Percona-XtraDB-Cluster-LATEST/Percona-XtraDB-Cluster-8.0.27/binary/tarball/$TARBALL"
223229
mkdir -p "$SANDBOX_BINARY"
224-
curl -L -f -o "/tmp/$TARBALL" "$URL"
230+
curl -L -f --retry 5 --retry-all-errors --retry-delay 2 -o "/tmp/$TARBALL" "$URL"
225231
./dbdeployer unpack "/tmp/$TARBALL" --sandbox-binary="$SANDBOX_BINARY"
226232
227233
- name: Test PXC with ProxySQL
@@ -232,7 +238,12 @@ jobs:
232238
BACKENDS=$($SBDIR/proxysql/use -BN -e "SELECT COUNT(*) FROM mysql_servers" 2>&1 | grep -v Warning)
233239
[ "$BACKENDS" = "3" ] || { echo "FAIL: expected 3 PXC backends, got $BACKENDS"; exit 1; }
234240
sleep 10
235-
RESULT=$($SBDIR/proxysql/use_proxy -BN -e "CREATE DATABASE IF NOT EXISTS proxysql_pxc_test; USE proxysql_pxc_test; CREATE TABLE IF NOT EXISTS t1 (id INT PRIMARY KEY, val VARCHAR(50)); INSERT INTO t1 VALUES (1, 'pxc_proxy_test'); SELECT val FROM t1 WHERE id=1;" 2>&1 | grep -v Warning)
241+
RESULT=""
242+
for i in $(seq 1 10); do
243+
RESULT=$($SBDIR/proxysql/use_proxy -BN -e "CREATE DATABASE IF NOT EXISTS proxysql_pxc_test; USE proxysql_pxc_test; CREATE TABLE IF NOT EXISTS t1 (id INT PRIMARY KEY, val VARCHAR(50)); INSERT INTO t1 VALUES (1, 'pxc_proxy_test'); SELECT val FROM t1 WHERE id=1;" 2>&1 | grep -v Warning) || true
244+
echo "$RESULT" | grep -q "pxc_proxy_test" && break
245+
sleep 2
246+
done
236247
echo "$RESULT" | grep -q "pxc_proxy_test" || { echo "FAIL: ProxySQL did not return the inserted PXC row"; exit 1; }
237248
238249
- name: Cleanup
@@ -301,7 +312,7 @@ jobs:
301312
TARBALL="mariadb-${MARIADB_GALERA_VERSION}-linux-systemd-x86_64.tar.gz"
302313
URL="https://archive.mariadb.org/mariadb-${MARIADB_GALERA_VERSION}/bintar-linux-systemd-x86_64/$TARBALL"
303314
mkdir -p "$SANDBOX_BINARY"
304-
curl -L -f -o "/tmp/$TARBALL" "$URL"
315+
curl -L -f --retry 5 --retry-all-errors --retry-delay 2 -o "/tmp/$TARBALL" "$URL"
305316
./dbdeployer unpack "/tmp/$TARBALL" --sandbox-binary="$SANDBOX_BINARY"
306317
307318
- name: Test MariaDB Galera with ProxySQL
@@ -312,7 +323,12 @@ jobs:
312323
BACKENDS=$($SBDIR/proxysql/use -BN -e "SELECT COUNT(*) FROM mysql_servers" 2>&1 | grep -v Warning)
313324
[ "$BACKENDS" = "3" ] || { echo "FAIL: expected 3 Galera backends, got $BACKENDS"; exit 1; }
314325
sleep 10
315-
RESULT=$($SBDIR/proxysql/use_proxy -BN -e "CREATE DATABASE IF NOT EXISTS proxysql_galera_test; USE proxysql_galera_test; CREATE TABLE IF NOT EXISTS t1 (id INT PRIMARY KEY, val VARCHAR(50)); INSERT INTO t1 VALUES (1, 'galera_proxy_test'); SELECT val FROM t1 WHERE id=1;" 2>&1 | grep -v Warning)
326+
RESULT=""
327+
for i in $(seq 1 10); do
328+
RESULT=$($SBDIR/proxysql/use_proxy -BN -e "CREATE DATABASE IF NOT EXISTS proxysql_galera_test; USE proxysql_galera_test; CREATE TABLE IF NOT EXISTS t1 (id INT PRIMARY KEY, val VARCHAR(50)); INSERT INTO t1 VALUES (1, 'galera_proxy_test'); SELECT val FROM t1 WHERE id=1;" 2>&1 | grep -v Warning) || true
329+
echo "$RESULT" | grep -q "galera_proxy_test" && break
330+
sleep 2
331+
done
316332
echo "$RESULT" | grep -q "galera_proxy_test" || { echo "FAIL: ProxySQL did not return the inserted Galera row"; exit 1; }
317333
318334
- name: Cleanup

sandbox/templates/galera/galera_replication.gotxt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# These options, after customization, are added to my.sandbox.cnf
2+
binlog_format=ROW
3+
default_storage_engine=InnoDB
4+
wsrep_on=ON
25
innodb_file_per_table
36
innodb_autoinc_lock_mode=2
47
wsrep-provider={{.GaleraLibPath}}

test/mock/galera_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function check_sst_method {
6161
ok_file_exists $my_file
6262
ok "expected is defined" "$expected"
6363

64-
found=$(grep "wsrep_sst_method\s*=\s*$expected" $my_file )
64+
found=$(grep -E "wsrep_sst_method[[:space:]]*=[[:space:]]*$expected" "$my_file")
6565
ok "Expected $expected found in $my_file" "$found"
6666
}
6767

0 commit comments

Comments
 (0)