From ff932ca2a0e429300fff8b7d36f3a6a11403b242 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 23 Mar 2020 07:32:18 -0700 Subject: [PATCH] fix: log only catastrophic errors in prepare storage (#9189) --- cmd/prepare-storage.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/prepare-storage.go b/cmd/prepare-storage.go index ce3b7bda0..aa5214ecb 100644 --- a/cmd/prepare-storage.go +++ b/cmd/prepare-storage.go @@ -246,7 +246,9 @@ func connectLoadInitFormats(retryCount int, firstDisk bool, endpoints Endpoints, } // not critical error but still print the error, nonetheless, which is perhaps unhandled if sErr != errUnformattedDisk && sErr != errDiskNotFound && retryCount >= 5 { - logger.Info("Unable to read 'format.json' from %s: %v\n", endpoints[i], sErr) + if sErr != nil { + logger.Info("Unable to read 'format.json' from %s: %v\n", endpoints[i], sErr) + } } }