ceph: remove unnecessary CR validation

Range checks for CR values are done statically in the CRD
for the number of mons. There is no need to check in the code
if the mon count is out of range.

Signed-off-by: travisn <tnielsen@redhat.com>
This commit is contained in:
travisn committed 2019-08-13 07:17:38 -06:00
1 parent d7716aba47
commit 258a66554f
1 file changed
-9
-9
View File
@@ -244,15 +244,6 @@ func (c *ClusterController) onAdd(obj interface{}) {
c.devicesInUse = true
}
if cluster.Spec.Mon.Count <= 0 {
logger.Warningf("mon count is 0 or less, should be at least 1, will use default value of %d", mon.DefaultMonCount)
cluster.Spec.Mon.Count = mon.DefaultMonCount
cluster.Spec.Mon.AllowMultiplePerNode = true
}
if cluster.Spec.Mon.Count > mon.MaxMonCount {
logger.Warningf("mon count is bigger than %d (given: %d), not supported, changing to %d", mon.MaxMonCount, cluster.Spec.Mon.Count, mon.MaxMonCount)
cluster.Spec.Mon.Count = mon.MaxMonCount
}
if cluster.Spec.Mon.Count%2 == 0 {
logger.Warningf("mon count is even (given: %d), should be uneven, continuing", cluster.Spec.Mon.Count)
}