mirror of
https://github.com/minio/minio.git
synced 2024-12-25 22:55:54 -05:00
fix: make sure maintenance=true is honored properly (#19156)
fixes a regression from #18700
This commit is contained in:
parent
44b70eb646
commit
d7520f0ae6
@ -2322,6 +2322,10 @@ func (z *erasureServerPools) Health(ctx context.Context, opts HealthOptions) Hea
|
|||||||
storageInfo := z.StorageInfo(ctx, false)
|
storageInfo := z.StorageInfo(ctx, false)
|
||||||
|
|
||||||
for _, disk := range storageInfo.Disks {
|
for _, disk := range storageInfo.Disks {
|
||||||
|
if disk.Local && opts.Maintenance {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if disk.PoolIndex > -1 && disk.SetIndex > -1 {
|
if disk.PoolIndex > -1 && disk.SetIndex > -1 {
|
||||||
if disk.State == madmin.DriveStateOk {
|
if disk.State == madmin.DriveStateOk {
|
||||||
si := erasureSetUpCount[disk.PoolIndex][disk.SetIndex]
|
si := erasureSetUpCount[disk.PoolIndex][disk.SetIndex]
|
||||||
|
@ -176,6 +176,7 @@ func getDisksInfo(disks []StorageAPI, endpoints []Endpoint, metrics bool) (disks
|
|||||||
PoolIndex: endpoints[index].PoolIdx,
|
PoolIndex: endpoints[index].PoolIdx,
|
||||||
SetIndex: endpoints[index].SetIdx,
|
SetIndex: endpoints[index].SetIdx,
|
||||||
DiskIndex: endpoints[index].DiskIdx,
|
DiskIndex: endpoints[index].DiskIdx,
|
||||||
|
Local: endpoints[index].IsLocal,
|
||||||
}
|
}
|
||||||
if disks[index] == OfflineDisk {
|
if disks[index] == OfflineDisk {
|
||||||
di.State = diskErrToDriveState(errDiskNotFound)
|
di.State = diskErrToDriveState(errDiskNotFound)
|
||||||
|
2
go.mod
2
go.mod
@ -51,7 +51,7 @@ require (
|
|||||||
github.com/minio/dperf v0.5.3
|
github.com/minio/dperf v0.5.3
|
||||||
github.com/minio/highwayhash v1.0.2
|
github.com/minio/highwayhash v1.0.2
|
||||||
github.com/minio/kes-go v0.2.1
|
github.com/minio/kes-go v0.2.1
|
||||||
github.com/minio/madmin-go/v3 v3.0.49-0.20240227160700-e447ce8f33b9
|
github.com/minio/madmin-go/v3 v3.0.49
|
||||||
github.com/minio/minio-go/v7 v7.0.67
|
github.com/minio/minio-go/v7 v7.0.67
|
||||||
github.com/minio/mux v1.9.0
|
github.com/minio/mux v1.9.0
|
||||||
github.com/minio/pkg/v2 v2.0.9-0.20240209124402-7990a27fd79d
|
github.com/minio/pkg/v2 v2.0.9-0.20240209124402-7990a27fd79d
|
||||||
|
6
go.sum
6
go.sum
@ -446,10 +446,8 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA
|
|||||||
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
|
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
|
||||||
github.com/minio/kes-go v0.2.1 h1:KnqS+p6xoSFJZbQhmJaz/PbxeA6nQyRqT/ywrn5lU2o=
|
github.com/minio/kes-go v0.2.1 h1:KnqS+p6xoSFJZbQhmJaz/PbxeA6nQyRqT/ywrn5lU2o=
|
||||||
github.com/minio/kes-go v0.2.1/go.mod h1:76xf7l41Wrh+IifisABXK2S8uZWYgWV1IGBKC3GdOJk=
|
github.com/minio/kes-go v0.2.1/go.mod h1:76xf7l41Wrh+IifisABXK2S8uZWYgWV1IGBKC3GdOJk=
|
||||||
github.com/minio/madmin-go/v3 v3.0.46 h1:DabFt+aUph5Vu/SOat2RWN/xVagPBU7qzxhAQ03hH/k=
|
github.com/minio/madmin-go/v3 v3.0.49 h1:Ag5eyYUf9K1MvW9hiErEJhGfqlf//pOtlhdoepb9AwY=
|
||||||
github.com/minio/madmin-go/v3 v3.0.46/go.mod h1:ZDF7kf5fhmxLhbGTqyq5efs4ao0v4eWf7nOuef/ljJs=
|
github.com/minio/madmin-go/v3 v3.0.49/go.mod h1:ZDF7kf5fhmxLhbGTqyq5efs4ao0v4eWf7nOuef/ljJs=
|
||||||
github.com/minio/madmin-go/v3 v3.0.49-0.20240227160700-e447ce8f33b9 h1:41H6CW/YJ0KbbxtL4DJUumxr696Mv9QYRXxptPW0xZc=
|
|
||||||
github.com/minio/madmin-go/v3 v3.0.49-0.20240227160700-e447ce8f33b9/go.mod h1:ZDF7kf5fhmxLhbGTqyq5efs4ao0v4eWf7nOuef/ljJs=
|
|
||||||
github.com/minio/mc v0.0.0-20240209221824-669cb0a9a475 h1:yfLzMougcV2xkVlWgwYwVRoT8pnXrcCV4oOQW+pI2EQ=
|
github.com/minio/mc v0.0.0-20240209221824-669cb0a9a475 h1:yfLzMougcV2xkVlWgwYwVRoT8pnXrcCV4oOQW+pI2EQ=
|
||||||
github.com/minio/mc v0.0.0-20240209221824-669cb0a9a475/go.mod h1:MmDLdb7NWd/OYhcKcXKvwErq2GNa/Zq6xtTWuhdC4II=
|
github.com/minio/mc v0.0.0-20240209221824-669cb0a9a475/go.mod h1:MmDLdb7NWd/OYhcKcXKvwErq2GNa/Zq6xtTWuhdC4II=
|
||||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||||
|
Loading…
Reference in New Issue
Block a user