fix: tweak the maintenance=true to satisfy baremetal first (#16864)

This commit is contained in:
Harshavardhana
2023-03-21 08:48:38 -07:00
committed by GitHub
parent fb1492f531
commit 12047702f5
2 changed files with 11 additions and 2 deletions

View File

@@ -47,7 +47,10 @@ func ClusterCheckHandler(w http.ResponseWriter, r *http.Request) {
ctx, cancel := context.WithTimeout(ctx, globalAPIConfig.getClusterDeadline())
defer cancel()
opts := HealthOptions{Maintenance: r.Form.Get("maintenance") == "true"}
opts := HealthOptions{
Maintenance: r.Form.Get("maintenance") == "true",
DeploymentType: r.Form.Get("deployment-type"),
}
result := objLayer.Health(ctx, opts)
if result.WriteQuorum > 0 {
w.Header().Set(xhttp.MinIOWriteQuorum, strconv.Itoa(result.WriteQuorum))