The Wayback Machine - https://web.archive.org/web/20201211001142/https://github.com/github/backup-utils/pull/601
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta: Execute ghe-restore tasks in parallel #601

Merged
merged 5 commits into from Apr 7, 2020

Conversation

@ryansimmen
Copy link
Member

@ryansimmen ryansimmen commented Apr 4, 2020

Execute long running restore tasks in parallel by leveraging moreutils parallel.

This resolves github/ghes-infrastructure#407

Most of this work is based upon work done in #597

@ryansimmen ryansimmen requested review from dbussink, lildude and snh Apr 4, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch 2 times, most recently from 5a5b659 to bde8ae9 Apr 4, 2020
@ryansimmen ryansimmen changed the title Execute ghe-restore tasks in parallel Beta: Execute ghe-restore tasks in parallel Apr 4, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 6a47bf3 to d263c8a Apr 5, 2020
@ryansimmen ryansimmen changed the base branch from ryansimmen/parallel-backup to master Apr 5, 2020
@ryansimmen ryansimmen changed the base branch from master to ryansimmen/parallel-backup Apr 5, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch 3 times, most recently from 775123b to 21c22e3 Apr 5, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 495c243 to 71b4e67 Apr 6, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch from 21c22e3 to 4a49554 Apr 6, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 71b4e67 to 01cabcd Apr 6, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch from 4a49554 to fa01a30 Apr 6, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 01cabcd to 53912d8 Apr 6, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch from fa01a30 to 1eea224 Apr 6, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 53912d8 to c8eccf8 Apr 6, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch 3 times, most recently from 2c89a01 to 0883e2a Apr 6, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch from 0883e2a to dcee3b0 Apr 7, 2020
@ryansimmen ryansimmen changed the base branch from ryansimmen/parallel-backup to master Apr 7, 2020
@lildude
lildude approved these changes Apr 7, 2020
Copy link
Member

@lildude lildude left a comment

LGTM

ghe-ssh "$GHE_HOSTNAME" -- /bin/bash 1>&3
done

ghe-ssh "$GHE_HOSTNAME" -- "sudo sh -c 'rm $GHE_REMOTE_DATA_USER_DIR/elasticsearch-restore/*.gz'" 1>&3

This comment has been minimized.

@ryansimmen

ryansimmen Apr 7, 2020
Author Member

When both ghe-restore-es-audit-log and ghe-restore-es-hookshot run at the same time during parallel restore, there is a race condition whereupon ghe-ssh "$GHE_HOSTNAME" -- "sudo sh -c 'rm $GHE_REMOTE_DATA_USER_DIR/elasticsearch-restore/*.gz'" 1>&3 from one script deletes the *.gz files that the other script had put down. I moved these files to separate directories so this wouldn't happen and my fix for the single-vm or configured edge case is to copy all files to the elasticsearch-restore folder so elasticsearch-post-start will process them accordingly.

@snh
snh approved these changes Apr 7, 2020
Copy link
Member

@snh snh left a comment

Looks good 👍

@ryansimmen ryansimmen merged commit 99108bc into master Apr 7, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dbussink dbussink deleted the ryansimmen/parallel-restore branch Apr 8, 2020
This was referenced Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.