summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-07-26 15:16:22 +0200
committerSimon Rettberg2024-07-26 15:16:22 +0200
commitaa45380906051e67cf803f05d379b662e10258d7 (patch)
tree95c9badf85a2279924d5d53e53e82fe3fe8ac115
parent[qemu] Fix concurrent modification error (diff)
downloadmltk-aa45380906051e67cf803f05d379b662e10258d7.tar.gz
mltk-aa45380906051e67cf803f05d379b662e10258d7.tar.xz
mltk-aa45380906051e67cf803f05d379b662e10258d7.zip
[dnbd3-proxy-mode] Wait for additional interfaces to get configured
-rwxr-xr-xcore/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy
index f420bdc6..b91deb20 100755
--- a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy
+++ b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy
@@ -194,8 +194,15 @@ else
fi
MAX_REPLICATION_SIZE=$(( disksize / 6 ))
- [ "$MAX_REPLICATION_SIZE" -lt 100 ] && MAX_REPLICATION_SIZE=100
-
+ (( MAX_REPLICATION_SIZE < 100 )) && MAX_REPLICATION_SIZE=100
+
+ # If we seem to have additional interfaces, wait a bit to make sure they get configured
+ sleep 1
+ numifs=$( systemctl list-units --legend=false "udhcpc@*" | wc -l )
+ if (( numifs > 1 )); then
+ echo "Waiting a bit since I see $numifs interfaces"
+ sleep 10
+ fi
MY_IPS=$( ip a | grep '^\s*inet\s' | awk '$2 !~ /^127\./ {print $2}' | awk -F/ '{print $1}' )
add_alt_server 'all' "Config, for client and server" ${SLX_DNBD3_PUBLIC}
add_alt_server 'replication' "Config, for replication only" ${SLX_DNBD3_PRIVATE}