From 4298f9758138c30e08975a84ced25d81e1fd53b9 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 14 Jul 2021 18:00:24 -0700 Subject: [PATCH] mon/MDSMonitor: give a proper error message if FSMap struct_v is too old Fixes: https://tracker.ceph.com/issues/51673 Signed-off-by: Patrick Donnelly --- src/mon/MDSMonitor.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index c4cfe6c785534..078deacce2543 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -146,7 +146,12 @@ void MDSMonitor::update_from_paxos(bool *need_bootstrap) ceph_assert(fsmap_bl.length() > 0); dout(10) << __func__ << " got " << version << dendl; - PaxosFSMap::decode(fsmap_bl); + try { + PaxosFSMap::decode(fsmap_bl); + } catch (const ceph::buffer::malformed_input& e) { + derr << "unable to decode FSMap: " << e.what() << dendl; + throw; + } // new map dout(0) << "new map" << dendl; -- 2.39.5