diff options
author | Magnus Ahltorp <map@kth.se> | 2016-08-19 16:53:32 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2016-08-19 16:53:32 +0200 |
commit | 1a2eca30e0065cf33f10dcd109402037821b7694 (patch) | |
tree | 9110415f2d72751017413728d96388276c28f97a | |
parent | 5ce811ec17bf5ca624794dcdb75cdc13dbdb7081 (diff) |
Allow permdb on non-merge nodes.
Disallow permdb for multi-node configs.
-rwxr-xr-x | tools/compileconfig.py | 12 |
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"), |