diff --git a/cmd/erasure-server-pool.go b/cmd/erasure-server-pool.go index 33273a520..da91f140d 100644 --- a/cmd/erasure-server-pool.go +++ b/cmd/erasure-server-pool.go @@ -2077,9 +2077,14 @@ func (z *erasureServerPools) getPoolAndSet(id string) (poolIdx, setIdx, diskIdx return -1, -1, -1, fmt.Errorf("DriveID(%s) %w", id, errDiskNotFound) } +const ( + vmware = "VMWare" +) + // HealthOptions takes input options to return sepcific information type HealthOptions struct { Maintenance bool + DeploymentType string } // HealthResult returns the current state of the system, also @@ -2165,7 +2170,8 @@ func (z *erasureServerPools) Health(ctx context.Context, opts HealthOptions) Hea } var aggHealStateResult madmin.BgHealState - if opts.Maintenance { + // Check if disks are healing on in-case of VMware vsphere deployments. + if opts.Maintenance && opts.DeploymentType == vmware { // check if local disks are being healed, if they are being healed // we need to tell healthy status as 'false' so that this server // is not taken down for maintenance diff --git a/cmd/healthcheck-handler.go b/cmd/healthcheck-handler.go index c004e2054..ed37fcbf1 100644 --- a/cmd/healthcheck-handler.go +++ b/cmd/healthcheck-handler.go @@ -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))