mirror of
https://github.com/hashicorp/vault.git
synced 2026-04-20 21:57:54 -04:00
Set partiallyWrappedPaths to false in operator_diagnose test (#22724)
* Fix failure in operator_diagnose test * Fix a typo * make fmt fix --------- Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
This commit is contained in:
parent
258dc91f09
commit
5481fd2cef
2 changed files with 3 additions and 9 deletions
|
|
@ -434,19 +434,13 @@ func (c *OperatorDiagnoseCommand) offlineDiagnostics(ctx context.Context) error
|
|||
sealcontext, sealspan := diagnose.StartSpan(ctx, "Create Vault Server Configuration Seals")
|
||||
|
||||
var setSealResponse *SetSealResponse
|
||||
var hasPartialPaths bool
|
||||
existingSealGenerationInfo, err := vault.PhysicalSealGenInfo(sealcontext, *backend)
|
||||
if err != nil {
|
||||
diagnose.Fail(sealcontext, fmt.Sprintf("Unable to get Seal genration information from storage: %s.", err.Error()))
|
||||
goto SEALFAIL
|
||||
}
|
||||
|
||||
hasPartialPaths, err = hasPartiallyWrappedPaths(context.Background(), *backend)
|
||||
if err != nil {
|
||||
diagnose.Fail(sealcontext, fmt.Sprintf("Cannot determine if there are parrtially seal wrapped entries in storage: %s.", err.Error()))
|
||||
goto SEALFAIL
|
||||
}
|
||||
setSealResponse, err = setSeal(server, config, make([]string, 0), make(map[string]string), existingSealGenerationInfo, hasPartialPaths)
|
||||
setSealResponse, err = setSeal(server, config, make([]string, 0), make(map[string]string), existingSealGenerationInfo, false /* unsealed vault has no partially wrapped paths */)
|
||||
if err != nil {
|
||||
diagnose.Advise(ctx, "For assistance with the seal stanza, see the Vault configuration documentation.")
|
||||
diagnose.Fail(sealcontext, fmt.Sprintf("Seal creation resulted in the following error: %s.", err.Error()))
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ func (c *ServerCommand) runRecoveryMode() int {
|
|||
|
||||
hasPartialPaths, err := hasPartiallyWrappedPaths(ctx, backend)
|
||||
if err != nil {
|
||||
c.UI.Error(fmt.Sprintf("Cannot determine if there are parrtially seal wrapped entries in storage: %v", err))
|
||||
c.UI.Error(fmt.Sprintf("Cannot determine if there are partially seal wrapped entries in storage: %v", err))
|
||||
return 1
|
||||
}
|
||||
setSealResponse, err := setSeal(c, config, infoKeys, info, existingSealGenerationInfo, hasPartialPaths)
|
||||
|
|
@ -1261,7 +1261,7 @@ func (c *ServerCommand) Run(args []string) int {
|
|||
|
||||
hasPartialPaths, err := hasPartiallyWrappedPaths(ctx, backend)
|
||||
if err != nil {
|
||||
c.UI.Error(fmt.Sprintf("Cannot determine if there are parrtially seal wrapped entries in storage: %v", err))
|
||||
c.UI.Error(fmt.Sprintf("Cannot determine if there are partially seal wrapped entries in storage: %v", err))
|
||||
return 1
|
||||
}
|
||||
setSealResponse, err := setSeal(c, config, infoKeys, info, existingSealGenerationInfo, hasPartialPaths)
|
||||
|
|
|
|||
Loading…
Reference in a new issue