Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon: show destroyed status in tree view; do not auto-out destroyed osds #16446

Merged
merged 4 commits into from Jul 26, 2017
Merged
Diff settings

Always

Just for now

Prev

mon/OSDMonitor: introduce mon_osd_destroyed_out_interval for destroye…

…d out control

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
  • Loading branch information...
xiexingguo committed Jul 26, 2017
commit 1e867d757e2ddcf3e68a7de7e645ccb4ce1e2943
@@ -212,6 +212,7 @@ OPTION(mon_osd_adjust_down_out_interval, OPT_BOOL) // true if we should scale b
OPTION(mon_osd_auto_mark_in, OPT_BOOL) // mark any booting osds 'in'
OPTION(mon_osd_auto_mark_auto_out_in, OPT_BOOL) // mark booting auto-marked-out osds 'in'
OPTION(mon_osd_auto_mark_new_in, OPT_BOOL) // mark booting new osds 'in'
OPTION(mon_osd_destroyed_out_interval, OPT_INT) // seconds
OPTION(mon_osd_down_out_interval, OPT_INT) // seconds
OPTION(mon_osd_down_out_subtree_limit, OPT_STR) // smallest crush unit/type that we will not automatically mark out
OPTION(mon_osd_min_up_ratio, OPT_DOUBLE) // min osds required to be up to mark things down
@@ -907,6 +907,10 @@ std::vector<Option> global_options = {
.set_default(true)
.set_description(""),

Option("mon_osd_destroyed_out_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(600)
.set_description(""),

Option("mon_osd_down_out_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(600)
.set_description(""),
@@ -3362,8 +3362,15 @@ void OSDMonitor::tick()
}
}

if (g_conf->mon_osd_down_out_interval > 0 &&
down.sec() >= grace) {
bool down_out = !osdmap.is_destroyed(o) &&
g_conf->mon_osd_down_out_interval > 0 && down.sec() >= grace;
bool destroyed_out = osdmap.is_destroyed(o) &&
g_conf->mon_osd_destroyed_out_interval > 0 &&
// this is not precise enough as we did not make a note when this osd
// was marked as destroyed, but let's not bother with that
// complexity for now.
down.sec() >= g_conf->mon_osd_destroyed_out_interval;
if (down_out || destroyed_out) {
dout(10) << "tick marking osd." << o << " OUT after " << down
<< " sec (target " << grace << " = " << orig_grace << " + " << my_grace << ")" << dendl;
pending_inc.new_weight[o] = CEPH_OSD_OUT;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.