]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MDSMonitor: give a proper error message if FSMap struct_v is too old
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 15 Jul 2021 01:00:24 +0000 (18:00 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 28 Jul 2021 14:07:05 +0000 (07:07 -0700)
Fixes: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mon/MDSMonitor.cc

index c4cfe6c785534a178e277dc1bde1e1faa1f168ef..078deacce2543d139af69aefa3a85f2cdff36ba7 100644 (file)
@@ -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;