]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Monitor: get rid of weighted clock skew reports 8051/head
authorJoao Eduardo Luis <joao@suse.de>
Thu, 7 Jan 2016 11:20:36 +0000 (11:20 +0000)
committerXiaoxi Chen <xiaoxchen@ebay.com>
Mon, 14 Mar 2016 00:50:12 +0000 (17:50 -0700)
By weighting the reports we were making it really hard to get rid of a
clock skew warning once the cause had been fixed.

Instead, as soon as we get a clean bill of health, let's run a new round
and soon as possible and ascertain whether that was a transient fix or
for realsies. That should be better than the alternative of waiting for
an hour or something (for a large enough skew) for the warning to go
away - and with it, the admin's sanity ("WHAT AM I DOING WRONG???").

Fixes: #14175
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
(cherry pick from commit 17d8ff429c7dca8fc1ada6e7cc8a7c4924a22e28)

src/mon/Monitor.cc

index 7662f07faa157c30b76580a56d79150e162a9654..bdaa1c1a864cfd5e7b4bcae28dce22b9e0ecfe6d 100644 (file)
@@ -3790,6 +3790,10 @@ void Monitor::timecheck_check_skews()
     dout(1) << __func__
       << " no clock skews found after " << timecheck_rounds_since_clean
       << " rounds" << dendl;
+    // make sure the skews are really gone and not just a transient success
+    // this will run just once if not in the presence of skews again.
+    timecheck_rounds_since_clean = 1;
+    timecheck_reset_event();
     timecheck_rounds_since_clean = 0;
   }
 
@@ -3992,11 +3996,7 @@ void Monitor::handle_timecheck_leader(MTimeCheck *m)
           << " delta " << delta << " skew_bound " << skew_bound
           << " latency " << latency << dendl;
 
-  if (timecheck_skews.count(other) == 0) {
-    timecheck_skews[other] = skew_bound;
-  } else {
-    timecheck_skews[other] = (timecheck_skews[other]*0.8)+(skew_bound*0.2);
-  }
+  timecheck_skews[other] = skew_bound;
 
   timecheck_acks++;
   if (timecheck_acks == quorum.size()) {