replication state -> replication mode in sys/health
This commit is contained in:
parent
6598182249
commit
d1631346ce
|
@ -9,10 +9,10 @@ DEPRECATIONS/CHANGES:
|
|||
could cause health checks on LBs to decide that the node was acceptable for
|
||||
traffic even though DR secondaries cannot handle normal Vault traffic. (In
|
||||
other words, the bool could only convey "yes" or "no" but not "not sure
|
||||
yet".) This has been replaced by `replication_dr_state` and
|
||||
`replication_performance_state` which are string values that convey the
|
||||
current state of the node; a value of `disabled` indicates that replication
|
||||
is disabled or the state is still being discovered. As a result, an LB check
|
||||
yet".) This has been replaced by `replication_dr_mode` and
|
||||
`replication_perf_mode` which are string values that convey the current
|
||||
state of the node; a value of `disabled` indicates that replication is
|
||||
disabled or the state is still being discovered. As a result, an LB check
|
||||
can positively verify that the node is both not `disabled` and is not a DR
|
||||
secondary, and avoid sending traffic to it if either is true.
|
||||
* PKI Secret Backend Roles parameter types: For `ou` and `organization`
|
||||
|
|
|
@ -147,27 +147,27 @@ func getSysHealth(core *vault.Core, r *http.Request) (int, *HealthResponse, erro
|
|||
|
||||
// Format the body
|
||||
body := &HealthResponse{
|
||||
Initialized: init,
|
||||
Sealed: sealed,
|
||||
Standby: standby,
|
||||
ReplicationPerformanceState: replicationState.GetPerformanceString(),
|
||||
ReplicationDRState: replicationState.GetDRString(),
|
||||
ServerTimeUTC: time.Now().UTC().Unix(),
|
||||
Version: version.GetVersion().VersionNumber(),
|
||||
ClusterName: clusterName,
|
||||
ClusterID: clusterID,
|
||||
Initialized: init,
|
||||
Sealed: sealed,
|
||||
Standby: standby,
|
||||
ReplicationPerfMode: replicationState.GetPerformanceString(),
|
||||
ReplicationDRMode: replicationState.GetDRString(),
|
||||
ServerTimeUTC: time.Now().UTC().Unix(),
|
||||
Version: version.GetVersion().VersionNumber(),
|
||||
ClusterName: clusterName,
|
||||
ClusterID: clusterID,
|
||||
}
|
||||
return code, body, nil
|
||||
}
|
||||
|
||||
type HealthResponse struct {
|
||||
Initialized bool `json:"initialized"`
|
||||
Sealed bool `json:"sealed"`
|
||||
Standby bool `json:"standby"`
|
||||
ReplicationPerformanceState string `json:"replication_performance_state"`
|
||||
ReplicationDRState string `json:"replication_dr_state"`
|
||||
ServerTimeUTC int64 `json:"server_time_utc"`
|
||||
Version string `json:"version"`
|
||||
ClusterName string `json:"cluster_name,omitempty"`
|
||||
ClusterID string `json:"cluster_id,omitempty"`
|
||||
Initialized bool `json:"initialized"`
|
||||
Sealed bool `json:"sealed"`
|
||||
Standby bool `json:"standby"`
|
||||
ReplicationPerfMode string `json:"replication_perf_mode"`
|
||||
ReplicationDRMode string `json:"replication_dr_mode"`
|
||||
ServerTimeUTC int64 `json:"server_time_utc"`
|
||||
Version string `json:"version"`
|
||||
ClusterName string `json:"cluster_name,omitempty"`
|
||||
ClusterID string `json:"cluster_id,omitempty"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue