From 1a2eca30e0065cf33f10dcd109402037821b7694 Mon Sep 17 00:00:00 2001 From: Magnus Ahltorp Date: Fri, 19 Aug 2016 16:53:32 +0200 Subject: Allow permdb on non-merge nodes. Disallow permdb for multi-node configs. --- tools/compileconfig.py | 12 +++++++++--- 1 file 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"), -- cgit v1.1