]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: no need for 'whoami' file in store
authorSage Weil <sage@newdream.net>
Mon, 17 May 2010 22:50:26 +0000 (15:50 -0700)
committerSage Weil <sage@newdream.net>
Mon, 24 May 2010 21:00:43 +0000 (14:00 -0700)
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.

src/cmon.cc
src/mon/Monitor.cc

index 9bed3f0cf652ecea866070a08334c9015cf8bd62..7fafe41f193c89933b1c8b0d5960919553589ccd 100644 (file)
@@ -83,17 +83,6 @@ int main(int argc, const char **argv)
     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
index f1b23ba96769b34e83e0a678afb8f33d9e54f37d..cf0b20bbe13853a72462f16450e5554455eaeb0f 100644 (file)
@@ -944,8 +944,6 @@ int Monitor::mkfs(bufferlist& osdmapbl)
     exit(1);
   }
   
-  store->put_int(whoami, "whoami", 0);
-
   bufferlist magicbl;
   magicbl.append(CEPH_MON_ONDISK_MAGIC);
   magicbl.append("\n");