Skip to content

Commit

Permalink
Re-add stored-shares for init and spit out a warning (#6677)
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai authored and briankassouf committed Jun 4, 2019
1 parent 2b8aa42 commit c0d04df
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions command/operator_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type OperatorInitCommand struct {
flagRecoveryShares int
flagRecoveryThreshold int
flagRecoveryPGPKeys []string
flagStoredShares int

// Consul
flagConsulAuto bool
Expand Down Expand Up @@ -139,6 +140,13 @@ func (c *OperatorInitCommand) Flags() *FlagSets {
"key.",
})

f.IntVar(&IntVar{
Name: "stored-shares",
Target: &c.flagStoredShares,
Default: -1,
Usage: "DEPRECATED: This flag does nothing. It will be removed in Vault 1.3.",
})

// Consul Options
f = set.NewFlagSet("Consul Options")

Expand Down Expand Up @@ -220,6 +228,10 @@ func (c *OperatorInitCommand) Run(args []string) int {
return 1
}

if c.flagStoredShares != -1 {
c.UI.Warn("-stored-shares has no effect and will be removed in Vault 1.3.\n")
}

// Build the initial init request
initReq := &api.InitRequest{
SecretShares: c.flagKeyShares,
Expand Down

0 comments on commit c0d04df

Please sign in to comment.