Skip to content

Commit

Permalink
mon: modify the level of a log about OSD's condition in OSDMonitor.cc
Browse files Browse the repository at this point in the history
In actual use,we  replace old hard disk by new or do performance testing regularly and need to down OSDs manually, but there are some OSDs can not be marked down,and there is no obvious information.
the log { dout(5) << "can_mark_down current up_ratio " << up_ratio << " < min "<< g_conf->mon_osd_min_up_ratio<< ", will not mark osd." << i << " down" << dendl; }" can explain  why it happened.
In addition, we can  change the value of mon_osd_min_up_ratio more reasonable in our operating environment.
so it is necessary to adjust the log's level lower.

forexample:
there are 6 OSDs ,wen have marked down 5 of them and the mon_osd_min_up_ratio = 0.3.
In this situation, when we  mark the last  OSD to down,it will show "ceph-osd stop/waiting", but in actually, the OSD is still up.

Signed-off-by: Yongqiang He <he.yongqiang@h3c.com>
  • Loading branch information
HeyoQiang committed Dec 18, 2015
1 parent f1c02a3 commit b9d5fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mon/OSDMonitor.cc
Expand Up @@ -1564,7 +1564,7 @@ bool OSDMonitor::can_mark_down(int i)
int up = osdmap.get_num_up_osds() - pending_inc.get_net_marked_down(&osdmap);
float up_ratio = (float)up / (float)num_osds;
if (up_ratio < g_conf->mon_osd_min_up_ratio) {
dout(5) << "can_mark_down current up_ratio " << up_ratio << " < min "
dout(2) << "can_mark_down current up_ratio " << up_ratio << " < min "
<< g_conf->mon_osd_min_up_ratio
<< ", will not mark osd." << i << " down" << dendl;
return false;
Expand Down

0 comments on commit b9d5fad

Please sign in to comment.