Unconditionally use the root namespace when calling sys/seal-status. (#10742)

This commit is contained in:
Mark Gritter 2021-01-25 11:25:54 -06:00 committed by GitHub
parent c74c381fb1
commit bd6d25499f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,11 @@ func (c *StatusCommand) Run(args []string) int {
return 1 return 1
} }
// Always query in the root namespace.
// Although seal-status is present in other namespaces, it will not
// be available until Vault is unsealed.
client.SetNamespace("")
status, err := client.Sys().SealStatus() status, err := client.Sys().SealStatus()
if err != nil { if err != nil {
c.UI.Error(fmt.Sprintf("Error checking seal status: %s", err)) c.UI.Error(fmt.Sprintf("Error checking seal status: %s", err))