Skip to content

Commit 0e63788

Browse files
committed
retry on cluster startup failure
1 parent c1ebc15 commit 0e63788

File tree

5 files changed

+47
-1
lines changed

5 files changed

+47
-1
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
java-version: 1.8
5151
- name: Start Database
52-
run: ./docker/start_db_${{ matrix.topology }}.sh ${{ matrix.docker-img }}
52+
run: ./docker/start_db_${{ matrix.topology }}_retry_fail.sh ${{ matrix.docker-img }}
5353
env:
5454
ARANGO_LICENSE_KEY: ${{ secrets.ARANGO_LICENSE_KEY }}
5555
- name: Test

docker/clean_cluster.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
for c in agent1 \
4+
agent2 \
5+
agent3 \
6+
dbserver1 \
7+
dbserver2 \
8+
coordinator1 \
9+
coordinator2; do
10+
docker rm -f $c
11+
done

docker/clean_single.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
docker rm -f arangodb

docker/start_db_cluster_retry_fail.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# USAGE:
4+
# export ARANGO_LICENSE_KEY=<arangodb-enterprise-license>
5+
# ./docker/start_db_cluster_retry_fail.sh <dockerImage>
6+
7+
# EXAMPLE:
8+
# ./docker/start_db_cluster_retry_fail.sh docker.io/arangodb/arangodb:3.7.1
9+
10+
./docker/start_db_cluster.sh "$1"
11+
while [ $? -ne 0 ]; do
12+
echo "=== === ==="
13+
echo "cluster startup failed, retrying ..."
14+
./docker/clean_cluster.sh
15+
./docker/start_db_cluster.sh "$1"
16+
done

docker/start_db_single_retry_fail.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# USAGE:
4+
# export ARANGO_LICENSE_KEY=<arangodb-enterprise-license>
5+
# ./docker/start_db_single_retry_fail.sh <dockerImage>
6+
7+
# EXAMPLE:
8+
# ./docker/start_db_single_retry_fail.sh docker.io/arangodb/arangodb:3.7.1
9+
10+
./docker/start_db_single.sh "$1"
11+
while [ $? -ne 0 ]; do
12+
echo "=== === ==="
13+
echo "single startup failed, retrying ..."
14+
./docker/clean_single.sh
15+
./docker/start_db_single.sh "$1"
16+
done

0 commit comments

Comments
 (0)