]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: always mark seed/mkfs monmap as epoch 0
authorSage Weil <sage@inktank.com>
Fri, 18 May 2012 16:38:52 +0000 (09:38 -0700)
committerSage Weil <sage@inktank.com>
Fri, 18 May 2012 23:23:58 +0000 (16:23 -0700)
This isn't strictly necessary, since the MonmapMonitor resets this on first
commit, but it's cleaner.

Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph_mon.cc

index 267afd5bb8f79c4472f84dbcaba292343f70863a..6ad27c2abc7cc4cffd59be320e9c22bd00ae0459 100644 (file)
@@ -124,6 +124,9 @@ int main(int argc, const char **argv)
       }
       try {
        monmap.decode(monmapbl);
+
+       // always mark seed/mkfs monmap as epoch 0
+       monmap.set_epoch(0);
       }
       catch (const buffer::error& e) {
        cerr << argv[0] << ": error decoding monmap " << g_conf->monmap << ": " << e.what() << std::endl;