From 436b834c1155a3fddc1da155f6085e800d8d2bcd Mon Sep 17 00:00:00 2001 From: Chris Hoffman Date: Wed, 12 Dec 2018 15:07:18 -0500 Subject: [PATCH] adding -dev-kv-v1 flag for forcing kvv1 (#5919) --- command/server.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/command/server.go b/command/server.go index 1b2762334081..a703ec124261 100644 --- a/command/server.go +++ b/command/server.go @@ -94,6 +94,7 @@ type ServerCommand struct { flagDevLatency int flagDevLatencyJitter int flagDevLeasedKV bool + flagDevKVV1 bool flagDevSkipInit bool flagDevThreeNode bool flagDevFourCluster bool @@ -250,6 +251,13 @@ func (c *ServerCommand) Flags() *FlagSets { Hidden: true, }) + f.BoolVar(&BoolVar{ + Name: "dev-kv-v1", + Target: &c.flagDevKVV1, + Default: false, + Hidden: true, + }) + f.BoolVar(&BoolVar{ Name: "dev-auto-seal", Target: &c.flagDevAutoSeal, @@ -356,7 +364,7 @@ func (c *ServerCommand) Run(args []string) int { allLoggers := []log.Logger{c.logger} // Automatically enable dev mode if other dev flags are provided. - if c.flagDevHA || c.flagDevTransactional || c.flagDevLeasedKV || c.flagDevThreeNode || c.flagDevFourCluster || c.flagDevAutoSeal { + if c.flagDevHA || c.flagDevTransactional || c.flagDevLeasedKV || c.flagDevThreeNode || c.flagDevFourCluster || c.flagDevAutoSeal || c.flagDevKVV1 { c.flagDev = true } @@ -1334,7 +1342,7 @@ func (c *ServerCommand) enableDev(core *vault.Core, coreConfig *vault.CoreConfig } // Upgrade the default K/V store - if !c.flagDevLeasedKV { + if !c.flagDevLeasedKV && !c.flagDevKVV1 { req := &logical.Request{ Operation: logical.UpdateOperation, ClientToken: init.RootToken,