]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: warn in newfs if crash_replay_interval=0
authorJohn Spray <john.spray@inktank.com>
Tue, 29 Apr 2014 15:22:51 +0000 (16:22 +0100)
committerJohn Spray <jspray@redhat.com>
Mon, 30 Jun 2014 09:33:03 +0000 (10:33 +0100)
This is the setting we would apply to data pools
created automatically, so notify the user if they're
failing to use it for data pools they have created
by hand.

Signed-off-by: John Spray <john.spray@inktank.com>
src/mon/MDSMonitor.cc

index 2b5e8ac79ca36445c457f29dbdcd4241a1ab6a5d..5edd14ef970849348905d1441bbc796b5a85d8ae 100644 (file)
@@ -1152,6 +1152,14 @@ bool MDSMonitor::prepare_command(MMonCommand *m)
       goto out;
     }
 
+    // Warn if crash_replay_interval is not set on the data pool
+    //  (on creation should have done pools[pool].crash_replay_interval =
+    //  cct->_conf->osd_default_data_pool_replay_window;)
+    pg_pool_t const *data_pool = osdmon->osdmap.get_pg_pool(data);
+    if (data_pool->get_crash_replay_interval() == 0) {
+      ss << "warning: crash_replay_interval not set on data pool '" << data << "', ";
+    }
+    
     string sure;
     cmd_getval(g_ceph_context, cmdmap, "sure", sure);
     if (pending_mdsmap.enabled && sure != "--yes-i-really-mean-it") {