mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
prep: Initialization should wait instead of exit the servers. (#2872)
- Servers do not exit for invalid credentials instead they print and wait. - Servers do not exit for version mismatch instead they print and wait. - Servers do not exit for time differences between nodes they print and wait.
This commit is contained in:
@@ -134,3 +134,28 @@ func getFormatMsg(storageDisks []StorageAPI) string {
|
||||
}
|
||||
return msg
|
||||
}
|
||||
|
||||
func printConfigErrMsg(storageDisks []StorageAPI, sErrs []error, fn printOnceFunc) {
|
||||
msg := getConfigErrMsg(storageDisks, sErrs)
|
||||
fn(msg)
|
||||
}
|
||||
|
||||
// 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.")
|
||||
for i, disk := range storageDisks {
|
||||
if disk == nil {
|
||||
continue
|
||||
}
|
||||
if sErrs[i] == nil {
|
||||
continue
|
||||
}
|
||||
msg += fmt.Sprintf(
|
||||
"\n[%s] %s : %s",
|
||||
int2Str(i+1, len(storageDisks)),
|
||||
storageDisks[i],
|
||||
sErrs[i],
|
||||
)
|
||||
}
|
||||
return msg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user