}
void encode_payload(uint64_t features) {
- if (monmap_bl.length() && (features & CEPH_FEATURE_MONENC) == 0) {
+ if (monmap_bl.length() && (features != CEPH_FEATURES_ALL)) {
// reencode old-format monmap
MonMap t;
t.decode(monmap_bl);
dout(1) << __func__ << " obtained monmap e" << latest_monmap.epoch << dendl;
- latest_monmap.encode(bl, CEPH_FEATURES_ALL);
+ latest_monmap.encode(bl, quorum_features);
}
void Monitor::sync_reset_requester()
dout(10) << "try_send_message " << *m << " to " << to << dendl;
bufferlist bl;
- encode_message(m, CEPH_FEATURES_ALL, bl); // fixme: assume peers have all features we do.
+ encode_message(m, quorum_features, bl);
messenger->send_message(m, to);
assert(p != NULL);
if (prefix == "mon getmap") {
- p->encode(rdata, CEPH_FEATURES_ALL);
+ p->encode(rdata, m->get_connection()->get_features());
r = 0;
ss << "got monmap epoch " << p->get_epoch();
} else if (prefix == "mon dump") {
newmap.created = newmap.modified = ceph_clock_now(g_ceph_context);
// encode into pending incremental
- newmap.encode(pending_inc.fullmap);
+ newmap.encode(pending_inc.fullmap, mon->quorum_features);
}
void OSDMonitor::update_from_paxos(bool *need_bootstrap)
// write out the full map for all past epochs
bufferlist full_bl;
- osdmap.encode(full_bl);
+ osdmap.encode(full_bl, mon->quorum_features);
tx_size += full_bl.length();
put_version_full(t, osdmap.epoch, full_bl);
// encode
assert(get_last_committed() + 1 == pending_inc.epoch);
- ::encode(pending_inc, bl, CEPH_FEATURES_ALL);
+ ::encode(pending_inc, bl, mon->quorum_features);
/* put everything in the transaction */
put_version(t, pending_inc.epoch, bl);
}
rdata.append(ds);
} else if (prefix == "osd getmap") {
- p->encode(rdata);
+ p->encode(rdata, m->get_connection()->get_features());
ss << "got osdmap epoch " << p->get_epoch();
} else if (prefix == "osd getcrushmap") {
p->crush->encode(rdata);