From b245d600163f6337af15aedd1fea68f4e2a668a8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 21 Aug 2014 11:14:39 -0700 Subject: [PATCH] mon: generate cluster_fingerprint if null This triggers after an upgrade of a legacy cluster that has no fingerprint. Signed-off-by: Sage Weil --- src/mon/Monitor.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 919e240ad7904..537cefd82d6af 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -3945,6 +3945,15 @@ void Monitor::tick() finish_contexts(g_ceph_context, maybe_wait_for_quorum); } + if (is_leader() && paxos->is_active() && fingerprint.is_zero()) { + // this is only necessary on upgraded clusters. + MonitorDBStore::Transaction t; + prepare_new_fingerprint(&t); + bufferlist tbl; + t.encode(tbl); + paxos->propose_new_value(tbl, new C_NoopContext); + } + new_tick(); } -- 2.39.5