Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tom Niget
slapos
Commits
0c4337c7
Commit
0c4337c7
authored
May 09, 2022
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repman: reduce retry amount and rely on waitdatabases
parent
db281bc3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
software/repman/buildout.hash.cfg
software/repman/buildout.hash.cfg
+1
-1
software/repman/templates/repman-manager.sh.in
software/repman/templates/repman-manager.sh.in
+4
-6
software/repman/test/test.py
software/repman/test/test.py
+1
-1
No files found.
software/repman/buildout.hash.cfg
View file @
0c4337c7
...
...
@@ -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
...
...
software/repman/templates/repman-manager.sh.in
View file @
0c4337c7
...
...
@@ -12,7 +12,7 @@ get_token () {
wait_database () {
NAME=$1
for retry in {1..5}; do
for retry in {1..5
0
}; 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...";
sleep 15
fi
sleep 15
echo "Reloading cluster settings..."
curl -H "Authorization: Bearer ${TOKEN}" \
{{ secure_url }}/api/clusters/$NAME/settings/actions/reload
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
}
...
...
software/repman/test/test.py
View file @
0c4337c7
...
...
@@ -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
=
2
0
instance_max_retry
=
1
0
def
setUp
(
self
):
self
.
url
=
self
.
computer_partition
.
getConnectionParameterDict
()[
'url'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment