Skip to content

Commit

Permalink
Merge pull request #62 from NERSC/pat-tovo-fuse-wrapper-fix
Browse files Browse the repository at this point in the history
add pat's suggested fuse wrapper fix
  • Loading branch information
scanon authored May 11, 2023
2 parents 923ea6c + 5259bc7 commit 031ff75
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion bin/fuse-overlayfs-wrap
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,23 @@

LOG=/tmp/fow-$(id -u).log
LOG=/dev/null

UMOUNT_WAIT_RETRIES=${UMOUNT_WAIT_RETRIES:-"5"}
UMOUNT_WAIT_DELAY=${UMOUNT_WAIT_DELAY:-"1"}

if [ "$1" = "wait" ] ; then
inotifywait -e delete $2/etc
umount $3

for i in $(seq $UMOUNT_WAIT_RETRIES); do
umount -v $3 >> $LOG 2>&1
if [ $? -ne 0 ]; then
# Sleep to let podman clean up
echo "Retry umount after sleep $UMOUNT_WAIT_DELAY second(s)" >> $LOG
sleep $UMOUNT_WAIT_DELAY
else
break
fi
done
exit
fi

Expand Down

0 comments on commit 031ff75

Please sign in to comment.