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 <sage@redhat.com>
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);