Skip to content

Commit a4fe8f8

Browse files
committed
added a wait for mysql via haproxy after external restore script
1 parent 58aadea commit a4fe8f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

share/github-backup-utils/ghe-restore-mysql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ snapshot_dir="$GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT"
3232
if is_external_database_snapshot; then
3333
if [ -n "$EXTERNAL_DATABASE_RESTORE_SCRIPT" ]; then
3434
$EXTERNAL_DATABASE_RESTORE_SCRIPT
35+
# ensure that haproxy and mysql are accepting connections before continuining
36+
if ! ghe-ssh "$GHE_HOSTNAME" -- /usr/local/share/enterprise/ghe-service-wait-mysql; then
37+
error_message "Failed to connect to MySQL service!"
38+
exit 2
39+
fi
3540
bm_end "$(basename $0)"
3641
exit 0
3742
else

0 commit comments

Comments
 (0)