mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
add new errors for Disks with timeouts (#17770)
This commit is contained in:
@@ -275,6 +275,10 @@ func (p *xlStorageDiskIDCheck) DiskInfo(ctx context.Context, metrics bool) (info
|
||||
si := p.updateStorageMetrics(storageMetricDiskInfo)
|
||||
defer si(&err)
|
||||
|
||||
if metrics {
|
||||
info.Metrics = p.getMetrics()
|
||||
}
|
||||
|
||||
if p.health.isFaulty() {
|
||||
// if disk is already faulty return faulty for 'mc admin info' output and prometheus alerts.
|
||||
return info, errFaultyDisk
|
||||
@@ -285,10 +289,6 @@ func (p *xlStorageDiskIDCheck) DiskInfo(ctx context.Context, metrics bool) (info
|
||||
return info, err
|
||||
}
|
||||
|
||||
if metrics {
|
||||
info.Metrics = p.getMetrics()
|
||||
}
|
||||
|
||||
// check cached diskID against backend
|
||||
// only if its non-empty.
|
||||
if p.diskID != "" && p.diskID != info.ID {
|
||||
@@ -860,10 +860,9 @@ func (p *xlStorageDiskIDCheck) TrackDiskHealth(ctx context.Context, s storageMet
|
||||
p.health.tokens <- struct{}{}
|
||||
if errp != nil {
|
||||
err := *errp
|
||||
if err != nil && !errors.Is(err, io.EOF) {
|
||||
return
|
||||
if err == nil || errors.Is(err, io.EOF) {
|
||||
p.health.logSuccess()
|
||||
}
|
||||
p.health.logSuccess()
|
||||
}
|
||||
si(errp)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user