Skip to content

Commit

Permalink
fix: disk attach edge case (#6430)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad authored May 15, 2024
1 parent c2e72b1 commit 2366ad3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
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

0 comments on commit 2366ad3

Please sign in to comment.