]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Monitor: fix timechecks get_health clobbering overall status 227/head
authorJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 19 Apr 2013 19:20:12 +0000 (20:20 +0100)
committerSage Weil <sage@inktank.com>
Fri, 19 Apr 2013 19:26:13 +0000 (12:26 -0700)
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/mon/Monitor.cc

index c13773be817e59a32aa348f39e908a0b6f74e0d6..cc8527ed7f7eb007f207567fe0338e90a137006e 100644 (file)
@@ -2259,7 +2259,8 @@ void Monitor::get_health(string& status, bufferlist *detailbl, Formatter *f)
       ostringstream tcss;
       health_status_t tcstatus = timecheck_status(tcss, skew, latency);
       if (tcstatus != HEALTH_OK) {
-        overall = tcstatus;
+        if (overall > tcstatus)
+          overall = tcstatus;
         warns.push_back(name);
 
         ostringstream tmp_ss;