MCPcopy Create free account
hub / github.com/ceph/ceph / build_initial

Method build_initial

src/mon/MonMap.cc:921–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919}
920
921seastar::future<> MonMap::build_initial(const crimson::common::ConfigProxy& conf, bool for_mkfs)
922{
923 // mon_host_override?
924 if (maybe_init_with_mon_host(conf.get_val<std::string>("mon_host_override"),
925 for_mkfs)) {
926 return seastar::make_ready_future<>();
927 }
928
929 // file?
930 if (const auto monmap = conf.get_val<std::string>("monmap");
931 !monmap.empty()) {
932 return read_monmap(monmap);
933 } else {
934 // fsid from conf?
935 if (const auto new_fsid = conf.get_val<uuid_d>("fsid");
936 !new_fsid.is_zero()) {
937 fsid = new_fsid;
938 }
939 return build_monmap(conf, for_mkfs).then([this] {
940 created = ceph_clock_now();
941 last_changed = created;
942 calc_legacy_ranks();
943 });
944 }
945}
946
947#else // WITH_CRIMSON
948

Callers 8

mainFunction · 0.80
build_map_bufFunction · 0.80
mainFunction · 0.80
update_mkfsFunction · 0.80
TEST_FFunction · 0.80
TESTFunction · 0.80
startMethod · 0.80
build_initial_monmapMethod · 0.80

Calls 5

ceph_clock_nowFunction · 0.85
emptyMethod · 0.45
is_zeroMethod · 0.45
get_mon_addrsMethod · 0.45
sizeMethod · 0.45

Tested by 2

TEST_FFunction · 0.64
TESTFunction · 0.64