Skip to content

Commit

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

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

See MorphoCloud/MorphoCloudWorkflow@b23226c...ba09eb1
  • Loading branch information
jcfr committed Nov 25, 2024
1 parent 1cd661b commit 76cb20c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/create-instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,29 @@ 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'
}
max_attempts=5
for attempt in {1..$max_attempts}; do
check_mountpoint_ready
if check_mountpoint_ready; then
echo "Mount point /media/volume/MyData is ready."
break
else
echo "Attempt $attempt/$max_attempts: 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
ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
Expand Down

0 comments on commit 76cb20c

Please sign in to comment.