summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-09-05 16:06:18 +0200
committerSimon Rettberg2019-09-05 16:06:18 +0200
commit86667e36996c3ca414d760d6be47cd8b0d786994 (patch)
treed0e4962861df090ba8d5f113dbc31e107137ae0e
parent[SERVER] Support limiting alt-servers to specific namespace (diff)
downloaddnbd3-86667e36996c3ca414d760d6be47cd8b0d786994.tar.gz
dnbd3-86667e36996c3ca414d760d6be47cd8b0d786994.tar.xz
dnbd3-86667e36996c3ca414d760d6be47cd8b0d786994.zip
[SERVER] Update sample config
-rw-r--r--conf/README.server19
-rw-r--r--conf/alt-servers17
-rw-r--r--conf/server.conf8
3 files changed, 32 insertions, 12 deletions
diff --git a/conf/README.server b/conf/README.server
index 285758b..08be09f 100644
--- a/conf/README.server
+++ b/conf/README.server
@@ -7,13 +7,18 @@ There are two files in that dir
== alt-servers ==
List of known alt-servers for this server.
-Format:
-[PREFIX]<IP:PORT> [Comment]
-
-Prefix can be:
-+ - Only report server to clients as alt-server, but don't use for replication
-- - Only use server for replication, but don't advertise to clients
-No prefix means server will be advertised to clients and is used for replication
+INI Format:
+[Address]
+comment=Whatever
+for=client | replication
+namespace=some/path/
+
+All fields in a section are optional. If the "for" key is missing, the server
+will be used for replication and will be sent to clients that request a list
+of alt servers.
+The namespace key can be specified multiple times per section. If it is missing,
+the server will be used for all image names; otherwise, it will only be used
+for images which's name starts with one of the given strings.
If you're not running in proxy mode, this file won't do much for you
diff --git a/conf/alt-servers b/conf/alt-servers
index fd2f2ec..1d5d39e 100644
--- a/conf/alt-servers
+++ b/conf/alt-servers
@@ -1,4 +1,15 @@
-192.168.100.10 Some alt server
-+192.168.100.100 My first alt server that will not be used for replication
--192.168.100.50 Super sectret alt server that will be used for replication, but clients don't know about it
+[192.168.100.10]
+comment=Some alt server
+[192.168.100.100]
+comment=My first alt server that will not be used for replication
+for=client
+
+[192.168.100.50]
+comment=Super sectret alt server that will be used for replication, but clients don't know about it
+for=replication
+
+[192.168.100.123]
+comment=Also just for replication, and only for images starting with foobar/baz/
+namespace=foobar/baz/
+for=replication
diff --git a/conf/server.conf b/conf/server.conf
index 2f43247..a101f34 100644
--- a/conf/server.conf
+++ b/conf/server.conf
@@ -13,9 +13,10 @@ isProxy=true
backgroundReplication=true
; minimum amount of connected clients for background replication to kick in
bgrMinClients=0
-; if isProxy==true and another proxy requests and image that we don't have, should we ask our alt-servers for it?
+; if another proxy requests and image that we don't have, should we ask our alt-servers for it?
lookupMissingForProxy=true
-; create sparse files instead of preallocating; ignored if backgroundReplication=true -- only recommended if cache space is small
+; create sparse files instead of preallocating; ignored if backgroundReplication=true
+; -- only recommended if cache space is small
sparseFiles=false
; if true (which is the default), images will automatically be removed from the list if they can't be accessed
removeMissingImages=true
@@ -27,6 +28,9 @@ clientTimeout=15000
closeUnusedFd=false
; set this to true to load files without the .r[0-9]+ extension too, assuming RID=1
vmdkLegacyMode=false
+; Don't set the server flag when connecting to alt-servers
+; Intended for if the proxy is used for on-client caching
+pretendClient=false
[limits]
maxClients=2000