]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMonitor: add 'mon osd allow primary temp' bool option
authorIlya Dryomov <ilya.dryomov@inktank.com>
Fri, 28 Mar 2014 16:28:44 +0000 (18:28 +0200)
committerSage Weil <sage@inktank.com>
Mon, 31 Mar 2014 21:12:15 +0000 (14:12 -0700)
By default, we don't send out maps with primary_temp mappings because
there is no infrastructure in place that would make sure that the
entire cluster knows about primary_temp.  Add an option to allow
primary_temp mappings, for development purposes.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/common/config_opts.h
src/mon/OSDMonitor.cc

index 87ce3375d7092a006bc8036e843bd6dfcc8492bd..d1d79745c93e92a30c3ad133af365f7a78c5eead 100644 (file)
@@ -151,6 +151,7 @@ OPTION(mon_osd_min_up_ratio, OPT_DOUBLE, .3)    // min osds required to be up to
 OPTION(mon_osd_min_in_ratio, OPT_DOUBLE, .3)   // min osds required to be in to mark things out
 OPTION(mon_osd_max_op_age, OPT_DOUBLE, 32)     // max op age before we get concerned (make it a power of 2)
 OPTION(mon_osd_max_split_count, OPT_INT, 32) // largest number of PGs per "involved" OSD to let split create
+OPTION(mon_osd_allow_primary_temp, OPT_BOOL, false)  // allow primary_temp to be set in the osdmap
 OPTION(mon_osd_allow_primary_affinity, OPT_BOOL, false)  // allow primary_affinity to be set in the osdmap
 OPTION(mon_stat_smooth_intervals, OPT_INT, 2)  // smooth stats over last N PGMap maps
 OPTION(mon_lease, OPT_FLOAT, 5)       // lease interval
index dce55ef11b42d4d453701644e675e3e92f3fbf59..28ca8b448c931a8c87406ed05b48692c83dca3f2 100644 (file)
@@ -263,7 +263,7 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
 
   /** we don't have any of the feature bit infrastructure in place for
    * supporting primary_temp mappings without breaking old clients/OSDs.*/
-  assert(osdmap.primary_temp->empty());
+  assert(g_conf->mon_osd_allow_primary_temp || osdmap.primary_temp->empty());
 
   if (mon->is_leader()) {
     // kick pgmon, make sure it's seen the latest map