]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: modify the level of a log about OSD's condition in OSDMonitor.cc 6928/head
authorYongqiang He <he.yongqiang@h3c.com>
Thu, 17 Dec 2015 18:57:07 +0000 (13:57 -0500)
committerYongqiang He <he.yongqiang@h3c.com>
Fri, 18 Dec 2015 09:15:04 +0000 (04:15 -0500)
    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.

For example:
   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>
src/mon/OSDMonitor.cc

index 3e7cd35a164bb46f5ae8e843fa9fe3099eeb8cf3..0514c8aed73d9c8ed7e47ebe9bc29e4bb2117246 100644 (file)
@@ -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;