From 475fcb4c21917c732d4ab9e2d04888f2ecd6bdfb Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Mon, 25 Mar 2024 07:19:20 +0100 Subject: [PATCH] check the sync status before reporting a node as available to serve --- restore-volumes.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/restore-volumes.sh b/restore-volumes.sh index 5175972a..37e7eb55 100755 --- a/restore-volumes.sh +++ b/restore-volumes.sh @@ -60,7 +60,11 @@ for key in $keys; do if [ -z "$newest_file" ]; then if [[ "$2" = "--print-size-only" && $existing_size -gt 0 ]]; then # I only want to have a theoretical file size - required_space=$existing_size + status=$(./sync-status "$1") + if [ $? -eq 0 ]; then + # 0 means it's synced + required_space=$existing_size + fi #GB=$(echo "$existing_size / 1024 / 1024 / 1024" | bc ) #echo "$GB" #exit 0