summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2016-08-19 16:53:32 +0200
committerMagnus Ahltorp <map@kth.se>2016-08-19 16:53:32 +0200
commit1a2eca30e0065cf33f10dcd109402037821b7694 (patch)
tree9110415f2d72751017413728d96388276c28f97a /tools
parent5ce811ec17bf5ca624794dcdb75cdc13dbdb7081 (diff)
Allow permdb on non-merge nodes.permdb-config
Disallow permdb for multi-node configs.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/compileconfig.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/compileconfig.py b/tools/compileconfig.py
index d9ac740..9acc702 100755
--- a/tools/compileconfig.py
+++ b/tools/compileconfig.py
@@ -244,12 +244,18 @@ def gen_config(nodename, config, localconfig):
]
if "dbbackend" in localconfig:
+ dbbackend = localconfig["dbbackend"]
+ if dbbackend not in ("fsdb", "permdb"):
+ print >>sys.stderr, "DB backend not recognized:", dbbackend
+ sys.exit(1)
plopconfig += [
- (Symbol("db_backend"), Symbol(localconfig["dbbackend"])),
+ (Symbol("db_backend"), Symbol(dbbackend)),
]
- assert nodetype == set("mergenodes")
+ if dbbackend == "permdb" and len(localconfig["localnodes"]) != 1:
+ print >>sys.stderr, "When using permdb, all services have to be in the same node"
+ sys.exit(1)
- print "nodetype", nodetype
+ print "nodetype", ", ".join(nodetype)
if nodetype & set(["frontendnodes", "storagenodes"]):
plopconfig += [
(Symbol("entry_root_path"), paths["db"] + "certentries"),