diff options
author | Simon Rettberg | 2019-09-05 21:55:27 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-09-05 21:55:27 +0200 |
commit | ccaf1572b756021105b80a55e9a8eff6a5257c2f (patch) | |
tree | a76124619028044cf98977bf4d49c631cd33f057 /satellit_installer/static_files | |
parent | [SSPS] package name mysql-server changed to default-mysql-server (stretch+bus... (diff) | |
download | setup-scripts-ccaf1572b756021105b80a55e9a8eff6a5257c2f.tar.gz setup-scripts-ccaf1572b756021105b80a55e9a8eff6a5257c2f.tar.xz setup-scripts-ccaf1572b756021105b80a55e9a8eff6a5257c2f.zip |
[SSPS] Prepare for stage4 via DNBD3
is-enabled is gone since we're gonna always need dbnd3 anyways.
Add alt-servers file that would replicate from localhost via socat SSL
tunnel (TODO). Finally add dnbd3 user to images group so it can write
replicated stage4 images to NFS share.
Diffstat (limited to 'satellit_installer/static_files')
4 files changed, 9 insertions, 27 deletions
diff --git a/satellit_installer/static_files/dnbd3/alt-servers b/satellit_installer/static_files/dnbd3/alt-servers new file mode 100644 index 0000000..4bf5a12 --- /dev/null +++ b/satellit_installer/static_files/dnbd3/alt-servers @@ -0,0 +1,4 @@ +[127.0.0.1:5005] +comment=SSL tunnel to bwlp-masterserver.ruf.uni-freiburg.de:5006 for MaxiLinux +for=replication +namespace=stage4/bwlp/ diff --git a/satellit_installer/static_files/dnbd3/dnbd3-server.service b/satellit_installer/static_files/dnbd3/dnbd3-server.service index 25b5f7c..b9bff99 100644 --- a/satellit_installer/static_files/dnbd3/dnbd3-server.service +++ b/satellit_installer/static_files/dnbd3/dnbd3-server.service @@ -4,8 +4,6 @@ ConditionPathExists=!/srv/openslx/nfs/.notmounted [Service] User=dnbd3 -PermissionsStartOnly=true -ExecStartPre=/opt/openslx/dnbd3/is-enabled ExecStart=/opt/openslx/dnbd3/dnbd3-server -n Restart=always RestartSec=5 diff --git a/satellit_installer/static_files/dnbd3/is-enabled b/satellit_installer/static_files/dnbd3/is-enabled deleted file mode 100755 index 11d1fb0..0000000 --- a/satellit_installer/static_files/dnbd3/is-enabled +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Run as root! -# Check if dnbd3 is configured active in slx-admin -# If not, stop service and bail out, otherwise exit 0 to -# signal systemd that the daemon should start. -# Retry a couple of times if slx-admin returns -# neither YES nor NO - -for i in 1 2 3 4 END; do - RET=$(curl -m 3 -s 'http://127.0.0.1/slx-admin/api.php?do=dnbd3&get=enabled') - [ "$RET" = "YES" ] && exit 0 - if [ "$RET" = "NO" ]; then - systemctl stop dnbd3-server.service - exit 1 - fi - [ "$i" = "END" ] && break - sleep "$i" -done - -exit 2 - diff --git a/satellit_installer/static_files/dnbd3/server.conf b/satellit_installer/static_files/dnbd3/server.conf index 404e4ff..c3c7a8c 100644 --- a/satellit_installer/static_files/dnbd3/server.conf +++ b/satellit_installer/static_files/dnbd3/server.conf @@ -2,12 +2,14 @@ listenPort=5003 basePath=/srv/openslx/nfs serverPenalty=0 -clientPenalty=1000 -isProxy=false +clientPenalty=5000 +isProxy=true removeMissingImages=true +uplinkTimeout=5000 clientTimeout=15000 vmdkLegacyMode=true closeUnusedFd=true +autoFreeDiskSpaceDelay=-1 ; Log related config [logging] @@ -16,7 +18,7 @@ closeUnusedFd=true ;;file=./dnbd3.log fileMask=ERROR WARNING MINOR INFO DEBUG1 consoleMask=ERROR WARNING MINOR INFO -; Valid types (warning: specifying invalid types will not yield an error!) +; Valid types ; ERROR Fatal error, server will terminate ; WARNING Major issue, something is broken but keep running ; MINOR Minor issue, more of a hickup than serious problem |