mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
xl: prepare storage should Abort properly. (#4542)
Current state-machine didn't honor a situation which can arise when there is a combination of - formatted - unformatted - corrupted disks - this combination invariably goes into a mode where all servers are waiting perpetually forever thinking we will get quorum in future. At this point there is a distant possibility of ever getting a quorum since we don't even have quorum number of disks offline. We should exit and print a proper message per disk to indicate what went wrong and what was detected by the server. Refer #4477
This commit is contained in:
@@ -133,6 +133,14 @@ func printConfigErrMsg(storageDisks []StorageAPI, sErrs []error, fn printOnceFun
|
||||
// Generate a formatted message when cluster is misconfigured.
|
||||
func getConfigErrMsg(storageDisks []StorageAPI, sErrs []error) string {
|
||||
msg := colorBlue("\nDetected configuration inconsistencies in the cluster. Please fix following servers.")
|
||||
return msg + combineDiskErrs(storageDisks, sErrs)
|
||||
}
|
||||
|
||||
// Combines each disk errors in a newline formatted string.
|
||||
// this is a helper function in printing messages across
|
||||
// all disks.
|
||||
func combineDiskErrs(storageDisks []StorageAPI, sErrs []error) string {
|
||||
var msg string
|
||||
for i, disk := range storageDisks {
|
||||
if disk == nil {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user