Files
freeipa/ipatests
Rob Crittenden f589a8952c Fix div-by-zero when svc weight is 0 for all masters in location
The relative service weight output tries to show the relative
chance that any given master in a locaiton will be picked. This
didn't account for all masters having a weight of 0 which would
result in a divide-by-zero error.

Implement the following rules:
1. If all masters have weight == 0 then all are equally
   weighted.
2. If any masters have weight == 0 then they have an
   extremely small chance of being chosen, percentage is
   0.1.
3. Otherwise it's percentage change is based on the sum of
   the weights of non-zero masters.

https://pagure.io/freeipa/issue/8135

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2020-02-26 13:42:10 -05:00
..
2020-02-25 18:02:12 +02:00
2019-07-16 13:23:21 +03:00
2013-06-17 19:22:50 +02:00
2015-10-22 18:34:46 +02:00
2016-10-20 18:43:37 +02:00
2019-07-16 13:23:21 +03:00