Fix startup message when using single path (#18856)

This commit is contained in:
Frank Wessels 2024-01-24 10:02:56 -08:00 committed by GitHub
parent 708cebe7f0
commit 6c912ac960
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -810,8 +810,14 @@ func initFormatErasure(ctx context.Context, storageDisks []StorageAPI, setCount,
logger.Info(" - Drive: %s", disk.String())
}
})
logger.Info(color.Yellow("WARNING:")+" Host %v has more than %v drives of set. "+
"A host failure will result in data becoming unavailable.", host, wantAtMost)
var warning string
if wantAtMost == 0 {
warning = fmt.Sprintf("Host %v has all drives of set. ", host)
} else {
warning = fmt.Sprintf("Host %v has more than %v drives of set. ", host, wantAtMost)
}
logger.Info(color.Yellow("WARNING: ") + warning +
"A host failure will result in data becoming unavailable.")
}
}
}