fix: make sure maintenance=true is honored properly (#19156)

fixes a regression from #18700
This commit is contained in:
Harshavardhana
2024-02-29 08:37:57 -08:00
committed by GitHub
parent 44b70eb646
commit d7520f0ae6
4 changed files with 8 additions and 5 deletions

View File

@@ -2322,6 +2322,10 @@ func (z *erasureServerPools) Health(ctx context.Context, opts HealthOptions) Hea
storageInfo := z.StorageInfo(ctx, false)
for _, disk := range storageInfo.Disks {
if disk.Local && opts.Maintenance {
continue
}
if disk.PoolIndex > -1 && disk.SetIndex > -1 {
if disk.State == madmin.DriveStateOk {
si := erasureSetUpCount[disk.PoolIndex][disk.SetIndex]