]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: handle case where mon_globalid_prealloc > max_global_id 6010/head
authorSage Weil <sage@redhat.com>
Mon, 19 Jan 2015 00:49:20 +0000 (16:49 -0800)
committerSage Weil <sage@redhat.com>
Mon, 21 Sep 2015 18:01:04 +0000 (14:01 -0400)
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>
(cherry picked from commit bbaf582e5bb54ae35327ffd234e4ccf0f07317db)

src/mon/AuthMonitor.cc

index 359c2e101cf8c181b811a58bd9faf7fb65495a99..9e074e2c886a1ca1eeb9286e173846226286daa5 100644 (file)
@@ -339,7 +339,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();
   }