From 08013616070090cff56b9df074636d36bf8efab1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 11 Dec 2014 14:02:42 -0800 Subject: [PATCH] mon/OSDMonitor: dump inc and full maps we get a crc mismatch Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 44a7f12f660..8cfa369a28a 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -230,6 +230,24 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap) << inc.full_crc << " but actual is " << osdmap.crc << " features " << f << dendl; + + derr << "full map dump (crc " << full_bl.crc32c(-1) << "):\n"; + full_bl.hexdump(*_dout); + *_dout << "\ninc map dump (crc " << inc_bl.crc32c(-1) << "):\n"; + inc_bl.hexdump(*_dout); + *_dout << dendl; + bufferlist prev_bl, prev_bl2, again_bl; + get_version_full(osdmap.epoch-1, prev_bl); + OSDMap pristine; + pristine.decode(prev_bl); + pristine.encode(prev_bl2, f | CEPH_FEATURE_RESERVED); + derr << "previous osdmap reload, raw crc " << prev_bl.crc32c(-1) << dendl; + derr << "reencode of that is " << prev_bl2.crc32c(-1) << dendl; + pristine.apply_incremental(inc); + pristine.encode(again_bl, f | CEPH_FEATURE_RESERVED); + derr << "again raw crc is " << again_bl.crc32c(-1) << dendl; + derr << " full_crc " << pristine.crc << dendl; + assert(0 == "got mismatched crc encoding full map"); } -- 2.47.3