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:
Harshavardhana
2016-10-07 11:15:55 -07:00
committed by GitHub
parent e53a9f6cab
commit f1bc9343a1
16 changed files with 161 additions and 32 deletions

View File

@@ -246,18 +246,6 @@ func checkNamingDisks(disks []string) error {
return nil
}
// Validates remote disks are successfully accessible, ignores networks errors.
func validateRemoteDisks(disks []StorageAPI) error {
for _, disk := range disks {
_, err := disk.DiskInfo()
if _, ok := err.(*net.OpError); ok {
continue
}
return err
}
return nil
}
// Validate input disks.
func validateDisks(disks []string, ignoredDisks []string) []StorageAPI {
isXL := len(disks) > 1
@@ -278,10 +266,6 @@ func validateDisks(disks []string, ignoredDisks []string) []StorageAPI {
}
storageDisks, err := initStorageDisks(disks, ignoredDisks)
fatalIf(err, "Unable to initialize storage disks.")
if isXL {
err = validateRemoteDisks(storageDisks)
fatalIf(err, "Unable to validate remote disks.")
}
return storageDisks
}