Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
7694fc78
Commit
7694fc78
authored
6 years ago
by
roadscape
Browse files
Options
Downloads
Patches
Plain Diff
retriable state loading
parent
0a3f60a1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/entrypoint.sh
+16
-2
16 additions, 2 deletions
scripts/entrypoint.sh
with
16 additions
and
2 deletions
scripts/entrypoint.sh
+
16
−
2
View file @
7694fc78
...
@@ -21,8 +21,22 @@ if [[ "$RUN_IN_EB" ]]; then
...
@@ -21,8 +21,22 @@ if [[ "$RUN_IN_EB" ]]; then
cd
/var/lib/postgresql/9.5
cd
/var/lib/postgresql/9.5
echo
hivemind: attempting to pull
in
state file from s3://
$S3_BUCKET
/hivemind-
$SCHEMA_HASH
-latest
.tar.lz4
echo
hivemind: attempting to pull
in
state file from s3://
$S3_BUCKET
/hivemind-
$SCHEMA_HASH
-latest
.tar.lz4
s3cmd get s3://
$S3_BUCKET
/hivemind-
$SCHEMA_HASH
-latest
.tar.lz4 - | lz4
-d
|
tar
x
if
[[
$?
-ne
0
]]
;
then
finished
=
0
count
=
1
while
[[
$count
-le
5
]]
&&
[[
$finished
==
0
]]
do
s3cmd get s3://
$S3_BUCKET
/hivemind-
$SCHEMA_HASH
-latest
.tar.lz4 - | lz4
-d
|
tar
x
if
[[
$?
-ne
0
]]
;
then
sleep
1
echo
notifyalert hivemind: unable to pull state from S3 - attempt
$count
((
count++
))
else
finished
=
1
fi
done
if
[[
$finished
==
0
]]
;
then
if
[[
!
"
$SYNC_TO_S3
"
]]
;
then
if
[[
!
"
$SYNC_TO_S3
"
]]
;
then
echo
notifyalert hivemind: unable to pull state from S3 - exiting
echo
notifyalert hivemind: unable to pull state from S3 - exiting
exit
1
exit
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment