improve server startup error when pools are incorrect (#16056)

This commit is contained in:
Harshavardhana
2022-11-11 19:40:45 -08:00
committed by GitHub
parent 00857f8f59
commit 6d76db9d6c
2 changed files with 5 additions and 4 deletions

View File

@@ -167,12 +167,12 @@ func ValidateParity(ssParity, setDriveCount int) error {
// SS parity disks should be greater than or equal to minParityDisks.
// Parity below minParityDisks is not supported.
if ssParity > 0 && ssParity < minParityDisks {
return fmt.Errorf("Standard storage class parity %d should be greater than or equal to %d",
return fmt.Errorf("parity %d should be greater than or equal to %d",
ssParity, minParityDisks)
}
if ssParity > setDriveCount/2 {
return fmt.Errorf("Standard storage class parity %d should be less than or equal to %d", ssParity, setDriveCount/2)
return fmt.Errorf("parity %d should be less than or equal to %d", ssParity, setDriveCount/2)
}
return nil