Commit 0c4337c7 authored by Alain Takoudjou's avatar Alain Takoudjou

repman: reduce retry amount and rely on waitdatabases

parent db281bc3
......@@ -58,7 +58,7 @@ md5sum = c203f40a58386310a433b58fd345a341
[repman-manager-sh.in]
_update_hash_filename_ = templates/repman-manager.sh.in
md5sum = 70ddec7450ae8be728ec107b805fa9a6
md5sum = 414256c5cbeb6f28d154ec7a9f17e102
[dbjobs-in]
_update_hash_filename_ = templates/dbjobs.in
......
......@@ -12,7 +12,7 @@ get_token () {
wait_database () {
NAME=$1
for retry in {1..5}; do
for retry in {1..50}; do
echo ">> Wait until $NAME databases are ready...";
CODE=$(curl -H "Authorization: Bearer ${TOKEN}" -o /dev/null -w "%{http_code}" {{ secure_url }}/api/clusters/$NAME/actions/waitdatabases);
if [ $CODE -eq 504 ]; then
......@@ -28,11 +28,8 @@ wait_database () {
fi
fi
echo ">> [$retry] waitdatabases returned code $CODE...";
fi
sleep 15
echo "Reloading cluster settings..."
curl -H "Authorization: Bearer ${TOKEN}" \
{{ secure_url }}/api/clusters/$NAME/settings/actions/reload
fi
done
echo $CODE
}
......@@ -43,10 +40,11 @@ check_cluster () {
TOKEN=$(get_token | {{ jq_bin }} -r '.token')
ERRORS=$(curl -H "Authorization: Bearer ${TOKEN}" {{ secure_url }}/api/clusters/$NAME/topology/alerts | {{ jq_bin }} -r '.errors')
if [ "$ERRORS" != "null" ] && [ ! -z "$ERRORS" ]; then
echo "ERROR: Bootstrap replication of cluster $NAME failed!";
echo "ERROR: Replication on cluster $NAME is failing!";
echo $ERRORS;
return 1;
fi
echo "Replicaiton $NAME is OK."
return 0
}
......
......@@ -41,7 +41,7 @@ setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
class TestRepman(SlapOSInstanceTestCase):
__partition_reference__ = 'R'
# Repman need more deployments and a bit more time to be able to bootstrap correctly
instance_max_retry = 20
instance_max_retry = 10
def setUp(self):
self.url = self.computer_partition.getConnectionParameterDict()['url']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment