Make MON filter OSDs by block layout to prevent "refusing to start PGs of this pool" errors on misconfiguration

This commit is contained in:
Vitaliy Filippov
2023-09-16 17:52:17 +03:00
parent 27d0d5b06a
commit ff479a102d
4 changed files with 58 additions and 22 deletions
+3 -1
View File
@@ -186,10 +186,12 @@ json11::Json osd_t::get_statistics()
if (bs)
{
st["blockstore_ready"] = bs->is_started();
st["data_block_size"] = (uint64_t)bs->get_block_size();
st["size"] = bs->get_block_count() * bs->get_block_size();
st["free"] = bs->get_free_block_count() * bs->get_block_size();
}
st["data_block_size"] = (uint64_t)bs_block_size;
st["bitmap_granularity"] = (uint64_t)bs_bitmap_granularity;
st["immediate_commit"] = immediate_commit == IMMEDIATE_ALL ? "all" : (immediate_commit == IMMEDIATE_SMALL ? "small" : "none");
st["host"] = self_state["host"];
json11::Json::object op_stats, subop_stats;
for (int i = OSD_OP_MIN; i <= OSD_OP_MAX; i++)