From: Ilya Dryomov Date: Fri, 28 Mar 2014 16:28:44 +0000 (+0200) Subject: OSDMonitor: add 'mon osd allow primary temp' bool option X-Git-Tag: v0.79~38 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=255f84047e6dd46c519e2d8e7fc205fdd58cc9ec;p=ceph.git OSDMonitor: add 'mon osd allow primary temp' bool option 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 Reviewed-by: Sage Weil --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 87ce3375d709..d1d79745c93e 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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 diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index dce55ef11b42..28ca8b448c93 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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