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

fix: disk attach edge case #6430

Merged
merged 7 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/ci-setup-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ runs:
[ ! -f ~/delay_shutdown.sh ] && ( ! [ -f ~/.user-data-started ] || [ -f ~/.user-data-finished ] ) && break
[ -f ~/.setup-complete ] && ( ! [ -f ~/.user-data-started ] || [ -f ~/.user-data-finished ] ) && break
sleep 1
done
done
if ! [ -f ~/.setup-complete ] && [ -f ~/.user-data-started ] ; then
echo "Cache mount not seeming to be complete, exiting!"
exit 1
fi
2 changes: 1 addition & 1 deletion .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ class UserData {
`sudo service docker restart`,
"sudo wget -q https://github.com/earthly/earthly/releases/download/v0.8.10/earthly-linux-$(dpkg --print-architecture) -O /usr/local/bin/earthly",
"sudo chmod +x /usr/local/bin/earthly",
"sudo apt install -y brotli",
"for i in {1..3} ; do sudo apt install -y brotli && break; sleep 10; done",
'echo "MaxStartups 1000" >> /etc/ssh/sshd_config',
'echo "ClientAliveInterval=30" >> /etc/ssh/sshd_config',
'echo "ClientAliveCountMax=20" >> /etc/ssh/sshd_config',
Expand Down
2 changes: 1 addition & 1 deletion .github/spot-runner-action/src/userdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class UserData {
`sudo service docker restart`,
"sudo wget -q https://github.com/earthly/earthly/releases/download/v0.8.10/earthly-linux-$(dpkg --print-architecture) -O /usr/local/bin/earthly",
"sudo chmod +x /usr/local/bin/earthly",
"sudo apt install -y brotli",
"for i in {1..3} ; do sudo apt install -y brotli && break; sleep 10; done",
'echo "MaxStartups 1000" >> /etc/ssh/sshd_config',
'echo "ClientAliveInterval=30" >> /etc/ssh/sshd_config',
'echo "ClientAliveCountMax=20" >> /etc/ssh/sshd_config',
Expand Down
7 changes: 6 additions & 1 deletion scripts/ci/attach_ebs_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ if [ -f ~/.ebs-cache-mounted ] ; then
sleep 1
echo "Waiting for other mount to finish."
done
exit 0
if [ -f ~/.setup-complete ] ; then
echo "Failed to find mount! Taking mount lock and trying..."
rm -f ~/.ebs-cache-mounted
else
exit 0
fi
fi

# Mark to prevent race conditions
Expand Down
Loading