From: Sridhar Seshasayee Date: Wed, 2 Nov 2022 14:45:05 +0000 (+0530) Subject: osd: Reset mClock's OSD capacity config option for inactive device type X-Git-Tag: v17.2.6~174^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fb2ad2da9b76d898425c0d16f51e0cad82e7fecb;p=ceph.git osd: Reset mClock's OSD capacity config option for inactive device type 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 (cherry picked from commit a0781c7dbd92f9185861d5509674c9643234552e) --- diff --git a/src/osd/scheduler/mClockScheduler.cc b/src/osd/scheduler/mClockScheduler.cc index 0f2abf87b68..be6e00444bc 100644 --- a/src/osd/scheduler/mClockScheduler.cc +++ b/src/osd/scheduler/mClockScheduler.cc @@ -102,9 +102,11 @@ void mClockScheduler::set_max_osd_capacity() if (is_rotational) { max_osd_capacity = cct->_conf.get_val("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("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;