From e372e4e592a3d56cf71489728240b3b36fe6f5de Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 3 May 2023 15:05:45 -0700 Subject: [PATCH] add nodeName to the log while taking drive offline (#17124) --- cmd/xl-storage-disk-id-check.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/xl-storage-disk-id-check.go b/cmd/xl-storage-disk-id-check.go index dd745eebc..2ec616822 100644 --- a/cmd/xl-storage-disk-id-check.go +++ b/cmd/xl-storage-disk-id-check.go @@ -781,7 +781,7 @@ func (p *xlStorageDiskIDCheck) checkHealth(ctx context.Context) (err error) { t = time.Since(time.Unix(0, atomic.LoadInt64(&p.health.lastSuccess))) if t > maxTimeSinceLastSuccess { if atomic.CompareAndSwapInt32(&p.health.status, diskHealthOK, diskHealthFaulty) { - logger.LogAlwaysIf(ctx, fmt.Errorf("taking drive %s offline, time since last response %v", p.storage.String(), t.Round(time.Millisecond))) + logger.LogAlwaysIf(ctx, fmt.Errorf("node(%s): taking drive %s offline, time since last response %v", globalLocalNodeName, p.storage.String(), t.Round(time.Millisecond))) go p.monitorDiskStatus() } return errFaultyDisk @@ -813,7 +813,7 @@ func (p *xlStorageDiskIDCheck) monitorDiskStatus() { Force: false, }) if err == nil { - logger.Info("Able to read+write+delete, bringing drive %s online. Drive was offline for %s.", p.storage.String(), + logger.Info("node(%s): Read/Write/Delete successful, bringing drive %s online. Drive was offline for %s.", globalLocalNodeName, p.storage.String(), time.Since(time.Unix(0, atomic.LoadInt64(&p.health.lastSuccess)))) atomic.StoreInt32(&p.health.status, diskHealthOK) return