Always provide version & storage type in status output (#9598)
This commit is contained in:
parent
389f57ffa8
commit
7e2f80b8c4
|
@ -335,6 +335,7 @@ func OutputSealStatus(ui cli.Ui, client *api.Client, status *api.SealStatusRespo
|
||||||
}
|
}
|
||||||
|
|
||||||
out = append(out, fmt.Sprintf("Version | %s", status.Version))
|
out = append(out, fmt.Sprintf("Version | %s", status.Version))
|
||||||
|
out = append(out, fmt.Sprintf("Storage Type | %s", status.StorageType))
|
||||||
|
|
||||||
if status.ClusterName != "" && status.ClusterID != "" {
|
if status.ClusterName != "" && status.ClusterID != "" {
|
||||||
out = append(out, fmt.Sprintf("Cluster Name | %s", status.ClusterName))
|
out = append(out, fmt.Sprintf("Cluster Name | %s", status.ClusterName))
|
||||||
|
@ -347,7 +348,7 @@ func OutputSealStatus(ui cli.Ui, client *api.Client, status *api.SealStatusRespo
|
||||||
if err != nil && strings.Contains(err.Error(), "Vault is sealed") {
|
if err != nil && strings.Contains(err.Error(), "Vault is sealed") {
|
||||||
leaderStatus = &api.LeaderResponse{HAEnabled: true}
|
leaderStatus = &api.LeaderResponse{HAEnabled: true}
|
||||||
err = nil
|
err = nil
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ui.Error(fmt.Sprintf("Error checking leader status: %s", err))
|
ui.Error(fmt.Sprintf("Error checking leader status: %s", err))
|
||||||
return 1
|
return 1
|
||||||
|
@ -355,6 +356,7 @@ func OutputSealStatus(ui cli.Ui, client *api.Client, status *api.SealStatusRespo
|
||||||
|
|
||||||
// Output if HA is enabled
|
// Output if HA is enabled
|
||||||
out = append(out, fmt.Sprintf("HA Enabled | %t", leaderStatus.HAEnabled))
|
out = append(out, fmt.Sprintf("HA Enabled | %t", leaderStatus.HAEnabled))
|
||||||
|
|
||||||
if leaderStatus.HAEnabled {
|
if leaderStatus.HAEnabled {
|
||||||
mode := "sealed"
|
mode := "sealed"
|
||||||
if !status.Sealed {
|
if !status.Sealed {
|
||||||
|
|
|
@ -199,6 +199,7 @@ func handleSysSealStatusRaw(core *vault.Core, w http.ResponseWriter, r *http.Req
|
||||||
Sealed: true,
|
Sealed: true,
|
||||||
RecoverySeal: core.SealAccess().RecoveryKeySupported(),
|
RecoverySeal: core.SealAccess().RecoveryKeySupported(),
|
||||||
StorageType: core.StorageType(),
|
StorageType: core.StorageType(),
|
||||||
|
Version: version.GetVersion().VersionNumber(),
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue