From aed7a1818a52274696264059a9ce1dbacf316eaf Mon Sep 17 00:00:00 2001 From: Anis Eleuch Date: Fri, 8 Dec 2023 08:13:04 -0800 Subject: [PATCH] info: Populate pool/set/disk indexes for offline disks (#18613) This can be calculated from the disk layout and some external applications would like to know the location of the offline disks. --- cmd/notification.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/notification.go b/cmd/notification.go index 70f649683..5f0c98ece 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -975,8 +975,11 @@ func getOfflineDisks(offlineHost string, endpoints EndpointServerPools) []madmin for _, ep := range pool.Endpoints { if offlineHost == "" && ep.IsLocal || offlineHost == ep.Host { offlineDisks = append(offlineDisks, madmin.Disk{ - Endpoint: ep.String(), - State: string(madmin.ItemOffline), + Endpoint: ep.String(), + State: string(madmin.ItemOffline), + PoolIndex: ep.PoolIdx, + SetIndex: ep.SetIdx, + DiskIndex: ep.DiskIdx, }) } }