From: Sage Weil Date: Mon, 19 Jan 2015 00:49:20 +0000 (-0800) Subject: mon: handle case where mon_globalid_prealloc > max_global_id X-Git-Tag: v0.93~257^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3397%2Fhead;p=ceph.git mon: handle case where mon_globalid_prealloc > max_global_id This triggers with the new larger mon_globalid_prealloc value. It didn't trigger on the existing cluster I tested on because it already had a very large max. Signed-off-by: Sage Weil --- diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index c259e85ab0a..ee83f9dcaad 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -338,7 +338,8 @@ uint64_t AuthMonitor::assign_global_id(MAuth *m, bool should_increase_max) // bump the max? while (mon->is_leader() && - next_global_id >= max_global_id - g_conf->mon_globalid_prealloc / 2) { + (max_global_id < g_conf->mon_globalid_prealloc || + next_global_id >= max_global_id - g_conf->mon_globalid_prealloc / 2)) { increase_max_global_id(); }