mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: getServerPoolsAvailableSpace() shouldn't crash (#12478)
if one of the disk is offline then DiskInfo can be `nil` and crash in server pool.
This commit is contained in:
parent
8e9e028c0c
commit
0980554725
@ -221,6 +221,9 @@ func (z *erasureServerPools) getServerPoolsAvailableSpace(ctx context.Context, b
|
||||
continue
|
||||
}
|
||||
for _, disk := range zinfo {
|
||||
if disk == nil {
|
||||
continue
|
||||
}
|
||||
available += disk.Total - disk.Used
|
||||
}
|
||||
serverPools[i] = poolAvailableSpace{
|
||||
|
Loading…
Reference in New Issue
Block a user