fix: enhance GeeseFS mount script to ensure persistent availability
Some checks failed
Ansible Lint Check / check-ansible (push) Failing after 14s
Nix Format Check / check-format (push) Successful in 53s
Python Lint Check / check-python (push) Failing after 15m0s

This commit is contained in:
Menno van Leeuwen 2025-03-12 20:59:36 +01:00
parent b01b4e6a2d
commit 0fc1146b91
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -4,15 +4,25 @@
export AWS_ACCESS_KEY_ID="{{ lookup('community.general.onepassword', 'mfk2qgnaplgtk6xmfc3r6w6neq', vault='j7nmhqlsjmp2r6umly5t75hzb4', field='AWS_ACCESS_KEY_ID') }}"
export AWS_SECRET_ACCESS_KEY="{{ lookup('community.general.onepassword', 'mfk2qgnaplgtk6xmfc3r6w6neq', vault='j7nmhqlsjmp2r6umly5t75hzb4', field='AWS_SECRET_ACCESS_KEY') }}"
# Mount GeeseFS
sudo -E geesefs \
--endpoint https://hel1.your-objectstorage.com \
--list-type=2 \
--disable-xattr \
--no-implicit-dir \
--no-dir-object \
-o allow_other \
--uid 1000 \
--gid 100 \
mvl-sh \
/mnt/object_storage
# Ensure the mount is available at all times
while true; do
if ! mountpoint -q /mnt/object_storage; then
sudo -E geesefs \
--endpoint https://hel1.your-objectstorage.com \
--list-type=2 \
--disable-xattr \
--no-implicit-dir \
--no-dir-object \
-o allow_other \
--uid 1000 \
--gid 100 \
mvl-sh \
/mnt/object_storage
# If it failed die
if [ $? -ne 0 ]; then
exit 1
fi
fi
sleep 5
done