From 66b6289a1b64d2d77171a1071c098720a276f524 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 29 Aug 2011 11:41:24 -0700 Subject: [PATCH] mon: health not ok when up < in osds We were warning if there were any not up or in osds. Instead, warn if there are any osds that are in but not up. That means if a node fails and successfully marks the node out and retracts onto remaining nodes, the ceph cluster is healthy again. Presumably the fact that the nodes failed should raise other alerts, because those specific daemons/nodes are not healthy. Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 7c9e038cc282a..6f0ec107cfd3d 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1141,14 +1141,8 @@ enum health_status_t OSDMonitor::get_health(std::ostream &ss) const ss << "no osds"; ret = HEALTH_ERR; } else { - if (num_up_osds < num_osds) { - ss << (num_osds - num_up_osds) << "/" << num_osds << " osds down"; - ret = HEALTH_WARN; - } - if (num_in_osds < num_osds) { - if (ret != HEALTH_OK) - ss << ", "; - ss << (num_osds - num_in_osds) << "/" << num_osds << " osds out"; + if (num_up_osds < num_in_osds) { + ss << (num_in_osds - num_up_osds) << "/" << num_in_osds << " in osds are down"; ret = HEALTH_WARN; } } -- 2.39.5