Merge pull request #9859 from x11562/OSDMap

mon: osdmap's epoch should be more than 0

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
This commit is contained in:
Kefu Chai 2016-11-25 23:16:36 +08:00 committed by GitHub
commit e2c848d513

View File

@ -3259,11 +3259,9 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
epoch_t epoch = 0;
int64_t epochnum;
cmd_getval(g_ceph_context, cmdmap, "epoch", epochnum, (int64_t)0);
cmd_getval(g_ceph_context, cmdmap, "epoch", epochnum, (int64_t)osdmap.get_epoch());
epoch = epochnum;
if (!epoch)
epoch = osdmap.get_epoch();
bufferlist osdmap_bl;
int err = get_version_full(epoch, osdmap_bl);
if (err == -ENOENT) {