]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: reset OSDMap state before decode
authorSage Weil <sage@redhat.com>
Fri, 13 Oct 2017 22:11:38 +0000 (17:11 -0500)
committerSage Weil <sage@redhat.com>
Sat, 2 Dec 2017 03:16:22 +0000 (21:16 -0600)
This ensures we don't have any cruft left over in fields that decode()
assumes are initialized from the ctor (and not a previous instance).

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 6a6a29ec235617e26d393d9943e4ca872202fcea..fad0d3e4ec3b0863d8190f9f3be3c44f96c026d1 100644 (file)
@@ -343,6 +343,7 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
     get_version_full(latest_full, latest_bl);
     assert(latest_bl.length() != 0);
     dout(7) << __func__ << " loading latest full map e" << latest_full << dendl;
+    osdmap = OSDMap();
     osdmap.decode(latest_bl);
   }