Skip to content

Commit

Permalink
Merge pull request #482 from uccross/retry-failed-ceph-setup
Browse files Browse the repository at this point in the history
Retry the coffea_rados_parquet job 3 times to overcome the rare OSD segfault issue
  • Loading branch information
lgray authored Apr 2, 2021
2 parents 249acdd + fbb5f02 commit 2b24f81
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,7 @@ jobs:
docker build -t coffea-rados-parquet-test \
--file docker/coffea_rados_parquet/Dockerfile \
.
docker run \
-v $(pwd):/w \
-w /w \
-e IS_CI=true \
--privileged \
coffea-rados-parquet-test \
./docker/coffea_rados_parquet/script.sh
./docker/coffea_rados_parquet/run.sh
release:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
Expand Down
33 changes: 33 additions & 0 deletions docker/coffea_rados_parquet/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
set -ex

function fail {
echo $1 >&2
exit 1
}

function retry {
local n=1
local max=3
local delay=5
while true; do
"$@" && break || {
if [[ $n -lt $max ]]; then
((n++))
echo "Command failed. Attempt $n/$max:"
sleep $delay;
else
fail "The command has failed after $n attempts."
fi
}
done
}

retry docker run \
-v $(pwd):/w \
-w /w \
-e IS_CI=true \
--privileged \
coffea-rados-parquet-test \
./docker/coffea_rados_parquet/script.sh

0 comments on commit 2b24f81

Please sign in to comment.