summaryrefslogtreecommitdiffstats
path: root/src/mon/Paxos.cc
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2017-06-07 15:31:46 +0200
committerGitHub <noreply@github.com>2017-06-07 15:31:46 +0200
commit94d17fbe5e1ecd05a7e137e857da33877846f50e (patch)
tree72e489f2c79550f21a80d3b0645cfc723f7171de /src/mon/Paxos.cc
parentMerge pull request #15530 from tchaikov/wip-jq-without-first (diff)
parentmon/OSDMonitor: validate set-require-min-compat-client against connected clients (diff)
downloadceph-94d17fbe5e1ecd05a7e137e857da33877846f50e.tar.xz
ceph-94d17fbe5e1ecd05a7e137e857da33877846f50e.zip
Merge pull request #15371 from liewegas/wip-mon-client-features
mon: track features from connect clients, and use it to gate set-require-min-compat-client Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Diffstat (limited to 'src/mon/Paxos.cc')
-rw-r--r--src/mon/Paxos.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc
index 08741b17170..b1680d25aeb 100644
--- a/src/mon/Paxos.cc
+++ b/src/mon/Paxos.cc
@@ -17,6 +17,7 @@
#include "Monitor.h"
#include "messages/MMonPaxos.h"
+#include "mon/mon_types.h"
#include "common/config.h"
#include "include/assert.h"
#include "include/stringify.h"
@@ -1113,6 +1114,7 @@ void Paxos::handle_lease(MonOpRequestRef op)
ack->last_committed = last_committed;
ack->first_committed = first_committed;
ack->lease_timestamp = ceph_clock_now();
+ ::encode(mon->session_map.feature_map, ack->feature_map);
lease->get_connection()->send_message(ack);
// (re)set timeout event.
@@ -1136,7 +1138,11 @@ void Paxos::handle_lease_ack(MonOpRequestRef op)
}
else if (acked_lease.count(from) == 0) {
acked_lease.insert(from);
-
+ if (ack->feature_map.length()) {
+ auto p = ack->feature_map.begin();
+ FeatureMap& t = mon->quorum_feature_map[from];
+ ::decode(t, p);
+ }
if (acked_lease == mon->get_quorum()) {
// yay!
dout(10) << "handle_lease_ack from " << ack->get_source()