From 255f84047e6dd46c519e2d8e7fc205fdd58cc9ec Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Fri, 28 Mar 2014 18:28:44 +0200 Subject: [PATCH] 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 --- src/common/config_opts.h | 1 + src/mon/OSDMonitor.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.3