The monitor rank is provided during startup. No need to verify it against
the monitor store, especially since the stores are otherwise identical.
This makes it simpler to restore/duplicate/wahtever a monitor.. just copy
the files.
exit(1);
}
- // whoami?
- if (!store.exists_bl_ss("whoami")) {
- cerr << "mon fs missing 'whoami'.. did you run mkcephfs?" << std::endl;
- exit(1);
- }
- int w = store.get_int("whoami");
- if (w != whoami) {
- cerr << "monitor data is for mon" << w << ", but you said i was mon" << whoami << std::endl;
- exit(1);
- }
-
bufferlist magicbl;
store.get_bl_ss(magicbl, "magic", 0);
string magic(magicbl.c_str(), magicbl.length()-1); // ignore trailing \n
exit(1);
}
- store->put_int(whoami, "whoami", 0);
-
bufferlist magicbl;
magicbl.append(CEPH_MON_ONDISK_MAGIC);
magicbl.append("\n");