From d5a3ae6008e4399b336f3a72d8dee328f97a0002 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 8 Jun 2018 20:45:08 -0500 Subject: [PATCH] messages/MOSDPGScan: encode map_epcoh for query_epoch for pre-nautilus peers Pre-nautilus OSDs do not create last_peering_reset reliably (due to not having the previous commit's fix in place). Avoid breaking them during an upgrade by encoding the map_epcoh in place of the query_epoch. Signed-off-by: Sage Weil --- src/messages/MOSDPGScan.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/messages/MOSDPGScan.h b/src/messages/MOSDPGScan.h index d709e9dd645c..d921d27ea6c2 100644 --- a/src/messages/MOSDPGScan.h +++ b/src/messages/MOSDPGScan.h @@ -74,7 +74,12 @@ public: using ceph::encode; encode(op, payload); encode(map_epoch, payload); - encode(query_epoch, payload); + if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) { + // pre-nautilus OSDs do not set last_peering_reset properly + encode(map_epoch, payload); + } else { + encode(query_epoch, payload); + } encode(pgid.pgid, payload); encode(begin, payload); encode(end, payload); -- 2.47.3