Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
List of MorphoCloudWorkflow changes:

```
$ git shortlog b23226c..6aaadea --no-merges
Jean-Christophe Fillion-Robin (1):
      fix(create-instance): Check volume is effectively attached before copying
```

See MorphoCloud/MorphoCloudWorkflow@b23226c...6aaadea
  • Loading branch information
jcfr committed Nov 26, 2024
1 parent 1cd661b commit ceb70f7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/create-instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,32 @@ jobs:
- name: Copy installed files into attached volume
id: copy_installed_files
run: |
function check_mountpoint_ready {
ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-o LogLevel=ERROR \
exouser@$INSTANCE_IP \
'mountpoint -q /media/volume/MyData'
}
set +e
max_attempts=5
for attempt in $(seq 1 $max_attempts); do
echo "Checking if mount point is ready ($attempt/$max_attempts)"
check_mountpoint_ready
if check_mountpoint_ready; then
echo "Mount point /media/volume/MyData is ready."
break
else
echo "Mount point not ready. Retrying in 5 seconds..."
sleep 5
fi
done
if ! check_mountpoint_ready; then
echo "::error ::Mount point /media/volume/MyData not ready after $((max_attempts * 5)) seconds."
exit 1
fi
set -e
ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
Expand Down

0 comments on commit ceb70f7

Please sign in to comment.