.Users are now able to set the replica `size` to `1`
Previously, users were unable to set the pool `size` to `1`.
The `check_pg_num()` function would incorrectly calculate the projected placement group number of the pool, which resulted in an underflow.
Because of the false result, it appeared that the `pg_num` was larger than the maximum limit.
With this fix, the recent `check_pg_num()` function edits are reverted and the calculation is now working properly without resulting in an underflow and the users are now able to set the replica size to `1`.
The bug is due to underflow calculating the projected number of pgs - we should avoid this pg_num check at all when we're decreasing the size of a pool.
projected += pg_num * size;
projected -= pg_info.get_pg_num_target() * pg_info.get_size();
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Red Hat Ceph Storage 6.0 Bug Fix update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:1360
The bug is due to underflow calculating the projected number of pgs - we should avoid this pg_num check at all when we're decreasing the size of a pool. projected += pg_num * size; projected -= pg_info.get_pg_num_target() * pg_info.get_size();