replication state -> replication mode in sys/health

This commit is contained in:
Jeff Mitchell 2018-01-17 22:38:03 -05:00
parent 6598182249
commit d1631346ce
2 changed files with 22 additions and 22 deletions

View File

@ -9,10 +9,10 @@ DEPRECATIONS/CHANGES:
could cause health checks on LBs to decide that the node was acceptable for 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 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 other words, the bool could only convey "yes" or "no" but not "not sure
yet".) This has been replaced by `replication_dr_state` and yet".) This has been replaced by `replication_dr_mode` and
`replication_performance_state` which are string values that convey the `replication_perf_mode` which are string values that convey the current
current state of the node; a value of `disabled` indicates that replication state of the node; a value of `disabled` indicates that replication is
is disabled or the state is still being discovered. As a result, an LB check 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 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. secondary, and avoid sending traffic to it if either is true.
* PKI Secret Backend Roles parameter types: For `ou` and `organization` * PKI Secret Backend Roles parameter types: For `ou` and `organization`

View File

@ -147,27 +147,27 @@ func getSysHealth(core *vault.Core, r *http.Request) (int, *HealthResponse, erro
// Format the body // Format the body
body := &HealthResponse{ body := &HealthResponse{
Initialized: init, Initialized: init,
Sealed: sealed, Sealed: sealed,
Standby: standby, Standby: standby,
ReplicationPerformanceState: replicationState.GetPerformanceString(), ReplicationPerfMode: replicationState.GetPerformanceString(),
ReplicationDRState: replicationState.GetDRString(), ReplicationDRMode: replicationState.GetDRString(),
ServerTimeUTC: time.Now().UTC().Unix(), ServerTimeUTC: time.Now().UTC().Unix(),
Version: version.GetVersion().VersionNumber(), Version: version.GetVersion().VersionNumber(),
ClusterName: clusterName, ClusterName: clusterName,
ClusterID: clusterID, ClusterID: clusterID,
} }
return code, body, nil return code, body, nil
} }
type HealthResponse struct { type HealthResponse struct {
Initialized bool `json:"initialized"` Initialized bool `json:"initialized"`
Sealed bool `json:"sealed"` Sealed bool `json:"sealed"`
Standby bool `json:"standby"` Standby bool `json:"standby"`
ReplicationPerformanceState string `json:"replication_performance_state"` ReplicationPerfMode string `json:"replication_perf_mode"`
ReplicationDRState string `json:"replication_dr_state"` ReplicationDRMode string `json:"replication_dr_mode"`
ServerTimeUTC int64 `json:"server_time_utc"` ServerTimeUTC int64 `json:"server_time_utc"`
Version string `json:"version"` Version string `json:"version"`
ClusterName string `json:"cluster_name,omitempty"` ClusterName string `json:"cluster_name,omitempty"`
ClusterID string `json:"cluster_id,omitempty"` ClusterID string `json:"cluster_id,omitempty"`
} }