From: Samuel Just Date: Fri, 24 Feb 2023 02:39:27 +0000 (-0800) Subject: Merge pull request #48516 from athanatos/sjust/wip-57801 X-Git-Tag: v18.1.0~299 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=acedd169e42d5b579ef303bc00e387898d9277eb;p=ceph.git Merge pull request #48516 from athanatos/sjust/wip-57801 crimson,mon: add guards to avoid accidental crimson deployment and to avoid usage of unsupported features with crimson Reviewed-by: Radoslaw Zarzynski Reviewed-by: Greg Farnum --- acedd169e42d5b579ef303bc00e387898d9277eb diff --cc src/osd/OSDMap.cc index c36a926245c49,edd649085c199..b1f07de5ae0cd --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@@ -3840,9 -3815,18 +3870,10 @@@ void OSDMap::dump(Formatter *f, CephCon f->dump_string("require_osd_release", to_string(require_osd_release)); + f->dump_bool("allow_crimson", allow_crimson); f->open_array_section("pools"); - for (const auto &pool : pools) { - std::string name(""); - const auto &pni = pool_name.find(pool.first); - if (pni != pool_name.end()) - name = pni->second; - f->open_object_section("pool"); - f->dump_int("pool", pool.first); - f->dump_string("pool_name", name); - pool.second.dump(f); - f->close_section(); + for (const auto &[pid, pdata] : pools) { + dump_pool(cct, pid, pdata, f); } f->close_section(); @@@ -4179,9 -4147,12 +4210,12 @@@ void OSDMap::print(CephContext *cct, os } if (get_cluster_snapshot().length()) out << "cluster_snapshot " << get_cluster_snapshot() << "\n"; + if (allow_crimson) { + out << "allow_crimson=true\n"; + } out << "\n"; - print_pools(out); + print_pools(cct, out); out << "max_osd " << get_max_osd() << "\n"; print_osds(out);