From: songbaisen Date: Mon, 10 Apr 2017 02:21:06 +0000 (+0000) Subject: mon: fix synchronise pgmap with others X-Git-Tag: v12.0.2~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ba3c6a055d462895dad4ac5f61af43d7a373a20a;p=ceph.git mon: fix synchronise pgmap with others leader mon down for a long time and then the local pgmap/osdmap was behind latest map a lot, when it start and sync ,it will read full map from other mons; if serveral osds/pgs were deleted during mon offline, these osds/pgs will be left over in pgmap until manully restart ceph-mon process Solution: reset pgmap before read pgmap full,make sure local maps are the same as the latest map Signed-off-by: z09440 Signed-off-by: song baisen --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 6669ffcd4b35..c13a19755d9b 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -190,6 +190,8 @@ void PGMonitor::update_from_paxos(bool *need_bootstrap) int r = get_version(pg_map.version + 1, bl); if (r == -ENOENT) { dout(10) << __func__ << " failed to read_incremental, read_full" << dendl; + // reset pg map + pg_map = PGMap(); read_pgmap_full(); goto out; }