From: Loic Dachary Date: Sun, 2 Feb 2014 00:09:52 +0000 (+0100) Subject: mon: do not force proposal when no osds X-Git-Tag: v0.78~230^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1179%2Fhead;p=ceph.git mon: do not force proposal when no osds If there are no OSDs, there is no need to propose to paxos. It does not hurt on a production cluster but it matters when running tests because it effectively alway ignores --paxos-propose-interval. Reviewed-By: Christophe Courtaut Signed-off-by: Loic Dachary --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 8bf63ccdc5a8..c85a88c5f2b2 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -725,7 +725,8 @@ bool OSDMonitor::should_propose(double& delay) return true; // adjust osd weights? - if (osd_weight.size() == (unsigned)osdmap.get_max_osd()) { + if (osd_weight.size() > 0 && + osd_weight.size() == (unsigned)osdmap.get_max_osd()) { dout(0) << " adjusting osd weights based on " << osd_weight << dendl; osdmap.adjust_osd_weights(osd_weight, pending_inc); delay = 0.0;