]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: handle case where mon_globalid_prealloc > max_global_id 3397/head
authorSage Weil <sage@redhat.com>
Mon, 19 Jan 2015 00:49:20 +0000 (16:49 -0800)
committerSage Weil <sage@redhat.com>
Mon, 19 Jan 2015 00:49:20 +0000 (16:49 -0800)
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 <sage@redhat.com>
src/mon/AuthMonitor.cc

index c259e85ab0a3f4b9ec7440e3dd3cabd444d4d639..ee83f9dcaadd1662de4ee72b963d1c61e9b0fd66 100644 (file)
@@ -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();
   }