This commit modifies src/common/options/mon.yaml.in to add a
new config option to enable/disable tracking availability
score. This config option can be modified dynamically at
runtime as well.
To enable tracking availability score, we can run the
following command:
ceph config set mon enable_availability_tracking true
By default, tracking availability score is enabled.
To disable tracking availability score:
ceph config set mon enable_availablity_tracking false
When the feature is turned off, invoking the
`availability-status` command will display an error, prompting
the user to turn on the feature using the config option.
Fixes: https://tracker.ceph.com/issues/71494
Signed-off-by: Shraddha Agrawal <shraddhaag@ibm.com>
default: 2
services:
- mon
+- name: enable_availability_tracking
+ type: bool
+ level: advanced
+ desc: Calculate and store availablity score for each pool in the
+ cluster at regular intervals
+ default: true
+ services :
+ - mon
+ flags:
+ - runtime
+
\ No newline at end of file
get_last_committed() + 1));
return true;
} else if (prefix == "osd pool availability-status") {
+ if (!g_conf().get_val<bool>("enable_availability_tracking")) {
+ ss << "availability tracking is disabled; you can enable it by setting the config option enable_availability_tracking";
+ err = -EPERM;
+ goto reply_no_propose;
+ }
TextTable tbl;
tbl.define_column("POOL", TextTable::LEFT, TextTable::LEFT);
tbl.define_column("UPTIME", TextTable::LEFT, TextTable::RIGHT);