Depending on the underlying device type of an OSD, the mClock's OSD
capacity option of either osd_mclock_max_capacity_iops_hdd or
osd_mclock_max_capacity_iops_ssd is set during OSD boot-up. Both the
options have built-in defaults set. Therefore, when displaying the running
configuration of an OSD, both the values would be displayed with non-zero
values which could confuse/mislead a user.
To address this, override the inactive device type's capacity for the OSD
to '0'.
For e.g., with this change, if the underlying device type for an OSD is
an ssd, the cli displays the running configuration of
osd_mclock_max_capacity_iops_hdd for that OSD as '0' instead of it's
default value.
Fixes: https://tracker.ceph.com/issues/57963
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
(cherry picked from commit
a0781c7dbd92f9185861d5509674c9643234552e)
if (is_rotational) {
max_osd_capacity =
cct->_conf.get_val<double>("osd_mclock_max_capacity_iops_hdd");
+ cct->_conf.set_val("osd_mclock_max_capacity_iops_ssd", "0");
} else {
max_osd_capacity =
cct->_conf.get_val<double>("osd_mclock_max_capacity_iops_ssd");
+ cct->_conf.set_val("osd_mclock_max_capacity_iops_hdd", "0");
}
// Set per op-shard iops limit
max_osd_capacity /= num_shards;