summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-09-09 12:32:03 +0200
committerSimon Rettberg2019-09-09 12:32:03 +0200
commitdf086896eea217423c8b120068a5f200cb6e8a37 (patch)
tree9498fee73bca77489de49a6a54a4da3970945bb4
parent[rootfs-stage31] wait_for_iface: Consider carrier state too (diff)
downloadmltk-df086896eea217423c8b120068a5f200cb6e8a37.tar.gz
mltk-df086896eea217423c8b120068a5f200cb6e8a37.tar.xz
mltk-df086896eea217423c8b120068a5f200cb6e8a37.zip
[dnbd3-proxy-mode] Set more vars depending on mode (proxy/local caching)
-rwxr-xr-xcore/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy6
1 files changed, 6 insertions, 0 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 907ab59d..11a0e31a 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
@@ -130,6 +130,8 @@ if [ -n "$islocal" ]; then
# Local caching mode.
DNBD3_SPARSE="true"
+ DNBD3_PRETEND_CLIENT="true"
+ DNBD3_AUTOFREE=0 # Immediately start freeing images when running out of space in local caching mode
if [ -n "$SLX_DNBD3_MIN_GB_HASH" ] && [ "$SLX_DNBD3_MIN_GB_HASH" -gt 0 ] && [ "$disksize" -ge "$SLX_DNBD3_MIN_GB_HASH" ]; then
DNBD3_BGR="hashblock"
else
@@ -147,8 +149,10 @@ else
# Proxy mode
DNBD3_SPARSE="false"
+ DNBD3_PRETEND_CLIENT="false"
DNBD3_BGR="false"
DNBD3_LOOKUP="false"
+ DNBD3_AUTOFREE="18h"
DNBD3_SERVER_PENALTY=2000 # no BGR = don't like other servers connecting so much
if [ -n "${SLX_DNBD3_BGR}" ]; then
DNBD3_BGR="true"
@@ -235,6 +239,8 @@ sparseFiles=${DNBD3_SPARSE}
removeMissingImages=false
uplinkTimeout=5000
clientTimeout=15000
+pretendClient=${DNBD3_PRETEND_CLIENT}
+autoFreeDiskSpaceDelay=${DNBD3_AUTOFREE}
[limits]
maxReplicationSize=${MAX_REPLICATION_SIZE}G