Bug #23345
closed`ceph osd erasure-code-profile set` crashes the monitors on vstart clusters
0%
Description
Coming into OSDMonitor::parse_erasure_code_profile() will trigger an assert that probably should be an error instead.
The assert is essentially checking whether "plugin" is defined on the map. Instead, this should return an error if `plugin` is not defined.
Nevertheless, the trigger lies with parsing the `osd_pool_default_erasure_code_profile` config option map.
In this case, the map is actually parsed, but given the default value is
'plugin=jerasure technique=reed_sol_van k=2 m=1 crush-failure-domain=osd'
as assimilated from ceph.conf, the map turns out to be
$6 = std::map with 5 elements = { ["'plugin"] = "jerasure", ["crush-failure-domain"] = "osd'", ["k"] = "2", ["m"] = "1", ["technique"] = "reed_sol_van" }
Note how we have an extra single quote on `plugin` and `osd`. The map should have been parsed so that neither would have that extra character. This may also indicate we either have a bug in `get_json_str_map` or we need to change how the value is provided to the config option.