These options are special. Since we can't get the values from the mon,
we also shouldn't store them there. Most of them are not options that
can be changed anyway.
Signed-off-by: Sage Weil <sage@redhat.com>
done
ceph config show osd.0 | grep -c debug_asok | grep 0
-ceph config set osd.0 osd_data testorama
-while ! ceph config show osd.0 | grep osd_data | grep mon
+ceph config set osd.0 osd_scrub_cost 123
+while ! ceph config show osd.0 | grep osd_scrub_cost | grep mon
do
sleep 1
done
-ceph config rm osd.0 osd_data
+ceph config rm osd.0 osd_scrub_cost
# show-with-defaults
ceph config show-with-defaults osd.0 | grep debug_asok
goto reply;
}
- if (opt) {
- Option::value_t real_value;
- string errstr;
- err = opt->parse_value(value, &real_value, &errstr, &value);
- if (err < 0) {
- ss << "error parsing value: " << errstr;
- goto reply;
- }
+ Option::value_t real_value;
+ string errstr;
+ err = opt->parse_value(value, &real_value, &errstr, &value);
+ if (err < 0) {
+ ss << "error parsing value: " << errstr;
+ goto reply;
+ }
+
+ if (opt->has_flag(Option::FLAG_NO_MON_UPDATE)) {
+ err = -EINVAL;
+ ss << name << " is special and cannot be stored by the mon";
+ goto reply;
}
}