Skip to content

Commit

Permalink
adding -dev-kv-v1 flag for forcing kvv1 (#5919)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishoffman authored and briankassouf committed Dec 12, 2018
1 parent 8bdd74c commit 436b834
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ type ServerCommand struct {
flagDevLatency int
flagDevLatencyJitter int
flagDevLeasedKV bool
flagDevKVV1 bool
flagDevSkipInit bool
flagDevThreeNode bool
flagDevFourCluster bool
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 436b834

Please sign in to comment.