mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
Merge pull request #39555 from tchaikov/wip-drop-pre-nautilus
*: drop backward compatibility with pre-nautilus versions Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
commit
163f3b81b9
@ -1 +1 @@
|
||||
Subproject commit 70228ed56466b4be8a9abff9024f69820f68f6d0
|
||||
Subproject commit 8358e3b2379ab9a1f9a18edf1a10d34ff2b5dd6a
|
@ -203,22 +203,7 @@ void LogEntry::log_to_syslog(string level, string facility)
|
||||
|
||||
void LogEntry::encode(bufferlist& bl, uint64_t features) const
|
||||
{
|
||||
if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
|
||||
ENCODE_START(4, 2, bl);
|
||||
__u16 t = prio;
|
||||
entity_inst_t who;
|
||||
who.name = rank;
|
||||
who.addr = addrs.as_legacy_addr();
|
||||
encode(who, bl, features);
|
||||
encode(stamp, bl);
|
||||
encode(seq, bl);
|
||||
encode(t, bl);
|
||||
encode(msg, bl);
|
||||
encode(channel, bl);
|
||||
encode(name, bl);
|
||||
ENCODE_FINISH(bl);
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
ENCODE_START(5, 5, bl);
|
||||
__u16 t = prio;
|
||||
encode(name, bl);
|
||||
|
@ -126,13 +126,8 @@ public:
|
||||
using ceph::encode;
|
||||
paxos_encode();
|
||||
|
||||
if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
|
||||
header.version = 7;
|
||||
header.compat_version = 1;
|
||||
encode(server_addrs.legacy_addr(), payload, features);
|
||||
} else {
|
||||
encode(server_addrs, payload, features);
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
encode(server_addrs, payload, features);
|
||||
encode(gid, payload);
|
||||
encode(available, payload);
|
||||
encode(name, payload);
|
||||
@ -158,38 +153,18 @@ public:
|
||||
using ceph::decode;
|
||||
auto p = payload.cbegin();
|
||||
paxos_decode(p);
|
||||
assert(header.version >= 8);
|
||||
decode(server_addrs, p); // entity_addr_t for version < 8
|
||||
decode(gid, p);
|
||||
decode(available, p);
|
||||
decode(name, p);
|
||||
if (header.version >= 2) {
|
||||
decode(fsid, p);
|
||||
}
|
||||
if (header.version >= 3) {
|
||||
std::set<std::string> module_name_list;
|
||||
decode(module_name_list, p);
|
||||
// Only need to unpack this field if we won't have the full
|
||||
// ModuleInfo structures added in v7
|
||||
if (header.version < 7) {
|
||||
for (const auto &i : module_name_list) {
|
||||
MgrMap::ModuleInfo info;
|
||||
info.name = i;
|
||||
modules.push_back(std::move(info));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (header.version >= 4) {
|
||||
decode(command_descs, p);
|
||||
}
|
||||
if (header.version >= 5) {
|
||||
decode(metadata, p);
|
||||
}
|
||||
if (header.version >= 6) {
|
||||
decode(services, p);
|
||||
}
|
||||
if (header.version >= 7) {
|
||||
decode(modules, p);
|
||||
}
|
||||
decode(fsid, p);
|
||||
std::set<std::string> module_name_list;
|
||||
decode(module_name_list, p);
|
||||
decode(command_descs, p);
|
||||
decode(metadata, p);
|
||||
decode(services, p);
|
||||
decode(modules, p);
|
||||
if (header.version >= 9) {
|
||||
decode(mgr_features, p);
|
||||
}
|
||||
|
@ -46,15 +46,10 @@ public:
|
||||
paxos_encode();
|
||||
encode(fsid, payload);
|
||||
encode(name, payload);
|
||||
if (HAVE_FEATURE(features, SERVER_NAUTILUS)) {
|
||||
header.version = HEAD_VERSION;
|
||||
header.compat_version = COMPAT_VERSION;
|
||||
encode(addrs, payload, features);
|
||||
} else {
|
||||
header.version = 1;
|
||||
header.compat_version = 1;
|
||||
encode(addrs.legacy_addr(), payload, features);
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
header.version = HEAD_VERSION;
|
||||
header.compat_version = COMPAT_VERSION;
|
||||
encode(addrs, payload, features);
|
||||
}
|
||||
void decode_payload() override {
|
||||
using ceph::decode;
|
||||
@ -62,13 +57,8 @@ public:
|
||||
paxos_decode(p);
|
||||
decode(fsid, p);
|
||||
decode(name, p);
|
||||
if (header.version == 1) {
|
||||
entity_addr_t addr;
|
||||
decode(addr, p);
|
||||
addrs = entity_addrvec_t(addr);
|
||||
} else {
|
||||
decode(addrs, p);
|
||||
}
|
||||
assert(header.version > 1);
|
||||
decode(addrs, p);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -68,18 +68,7 @@ public:
|
||||
header.compat_version = COMPAT_VERSION;
|
||||
using ceph::encode;
|
||||
paxos_encode();
|
||||
if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
|
||||
header.version = 6;
|
||||
header.compat_version = 6;
|
||||
encode(sb, payload);
|
||||
hb_back_addrs.legacy_addr().encode(payload, features);
|
||||
cluster_addrs.legacy_addr().encode(payload, features);
|
||||
encode(boot_epoch, payload);
|
||||
hb_front_addrs.legacy_addr().encode(payload, features);
|
||||
encode(metadata, payload);
|
||||
encode(osd_features, payload);
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
encode(sb, payload);
|
||||
encode(hb_back_addrs, payload, features);
|
||||
encode(cluster_addrs, payload, features);
|
||||
@ -92,20 +81,7 @@ public:
|
||||
auto p = payload.cbegin();
|
||||
using ceph::decode;
|
||||
paxos_decode(p);
|
||||
if (header.version < 7) {
|
||||
entity_addr_t a;
|
||||
decode(sb, p);
|
||||
decode(a, p);
|
||||
hb_back_addrs = entity_addrvec_t(a);
|
||||
decode(a, p);
|
||||
cluster_addrs = entity_addrvec_t(a);
|
||||
decode(boot_epoch, p);
|
||||
decode(a, p);
|
||||
hb_front_addrs = entity_addrvec_t(a);
|
||||
decode(metadata, p);
|
||||
decode(osd_features, p);
|
||||
return;
|
||||
}
|
||||
assert(header.version >= 7);
|
||||
decode(sb, p);
|
||||
decode(hb_back_addrs, p);
|
||||
decode(cluster_addrs, p);
|
||||
|
@ -75,15 +75,9 @@ public:
|
||||
auto p = payload.cbegin();
|
||||
paxos_decode(p);
|
||||
decode(fsid, p);
|
||||
if (header.version < 4) {
|
||||
entity_inst_t i;
|
||||
decode(i, p);
|
||||
target_osd = i.name.num();
|
||||
target_addrs.v.push_back(i.addr);
|
||||
} else {
|
||||
decode(target_osd, p);
|
||||
decode(target_addrs, p);
|
||||
}
|
||||
assert(header.version >= 4);
|
||||
decode(target_osd, p);
|
||||
decode(target_addrs, p);
|
||||
decode(epoch, p);
|
||||
decode(flags, p);
|
||||
decode(failed_for, p);
|
||||
@ -92,17 +86,7 @@ public:
|
||||
void encode_payload(uint64_t features) override {
|
||||
using ceph::encode;
|
||||
paxos_encode();
|
||||
if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
|
||||
header.version = 3;
|
||||
header.compat_version = 3;
|
||||
encode(fsid, payload);
|
||||
encode(entity_inst_t(entity_name_t::OSD(target_osd),
|
||||
target_addrs.legacy_addr()), payload, features);
|
||||
encode(epoch, payload);
|
||||
encode(flags, payload);
|
||||
encode(failed_for, payload);
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
header.version = HEAD_VERSION;
|
||||
header.compat_version = COMPAT_VERSION;
|
||||
encode(fsid, payload);
|
||||
|
@ -48,16 +48,7 @@ public:
|
||||
using ceph::decode;
|
||||
auto p = payload.cbegin();
|
||||
paxos_decode(p);
|
||||
if (header.version <= 2) {
|
||||
decode(fsid, p);
|
||||
entity_inst_t i;
|
||||
decode(i, p);
|
||||
target_osd = i.name.num();
|
||||
target_addrs = entity_addrvec_t(i.addr);
|
||||
decode(epoch, p);
|
||||
decode(request_ack, p);
|
||||
return;
|
||||
}
|
||||
assert(header.version >= 3);
|
||||
decode(fsid, p);
|
||||
decode(target_osd, p);
|
||||
decode(target_addrs, p);
|
||||
@ -68,17 +59,7 @@ public:
|
||||
void encode_payload(uint64_t features) override {
|
||||
using ceph::encode;
|
||||
paxos_encode();
|
||||
if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
|
||||
header.version = 2;
|
||||
header.compat_version = 2;
|
||||
encode(fsid, payload);
|
||||
encode(entity_inst_t(entity_name_t::OSD(target_osd),
|
||||
target_addrs.legacy_addr()),
|
||||
payload, features);
|
||||
encode(epoch, payload);
|
||||
encode(request_ack, payload);
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
header.version = HEAD_VERSION;
|
||||
header.compat_version = COMPAT_VERSION;
|
||||
encode(fsid, payload);
|
||||
|
@ -22,7 +22,7 @@
|
||||
class MOSDPGInfo final : public Message {
|
||||
private:
|
||||
static constexpr int HEAD_VERSION = 6;
|
||||
static constexpr int COMPAT_VERSION = 5;
|
||||
static constexpr int COMPAT_VERSION = 6;
|
||||
|
||||
epoch_t epoch = 0;
|
||||
|
||||
@ -67,33 +67,13 @@ public:
|
||||
using ceph::encode;
|
||||
header.version = HEAD_VERSION;
|
||||
encode(epoch, payload);
|
||||
if (!HAVE_FEATURE(features, SERVER_OCTOPUS)) {
|
||||
// pretend to be vector<pair<pg_notify_t,PastIntervals>>
|
||||
header.version = 5;
|
||||
encode((uint32_t)pg_list.size(), payload);
|
||||
for (auto& i : pg_list) {
|
||||
encode(i, payload); // this embeds a dup (ignored) PastIntervals
|
||||
encode(i.past_intervals, payload);
|
||||
}
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_OCTOPUS));
|
||||
encode(pg_list, payload);
|
||||
}
|
||||
void decode_payload() override {
|
||||
using ceph::decode;
|
||||
auto p = payload.cbegin();
|
||||
decode(epoch, p);
|
||||
if (header.version == 5) {
|
||||
// decode legacy vector<pair<pg_notify_t,PastIntervals>>
|
||||
uint32_t num;
|
||||
decode(num, p);
|
||||
pg_list.resize(num);
|
||||
for (unsigned i = 0; i < num; ++i) {
|
||||
decode(pg_list[i], p);
|
||||
decode(pg_list[i].past_intervals, p);
|
||||
}
|
||||
return;
|
||||
}
|
||||
decode(pg_list, p);
|
||||
}
|
||||
private:
|
||||
|
@ -22,7 +22,7 @@
|
||||
class MOSDPGLog final : public MOSDPeeringOp {
|
||||
private:
|
||||
static constexpr int HEAD_VERSION = 6;
|
||||
static constexpr int COMPAT_VERSION = 5;
|
||||
static constexpr int COMPAT_VERSION = 6;
|
||||
|
||||
epoch_t epoch = 0;
|
||||
/// query_epoch is the epoch of the query being responded to, or
|
||||
@ -101,12 +101,8 @@ public:
|
||||
encode(info, payload);
|
||||
encode(log, payload);
|
||||
encode(missing, payload, features);
|
||||
if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
|
||||
// pre-nautilus OSDs do not set last_peering_reset properly
|
||||
encode(epoch, payload);
|
||||
} else {
|
||||
encode(query_epoch, payload);
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
encode(query_epoch, payload);
|
||||
encode(past_intervals, payload);
|
||||
encode(to, payload);
|
||||
encode(from, payload);
|
||||
@ -123,9 +119,8 @@ public:
|
||||
decode(past_intervals, p);
|
||||
decode(to, p);
|
||||
decode(from, p);
|
||||
if (header.version >= 6) {
|
||||
decode(lease, p);
|
||||
}
|
||||
assert(header.version >= 6);
|
||||
decode(lease, p);
|
||||
}
|
||||
private:
|
||||
template<class T, typename... Args>
|
||||
|
@ -26,7 +26,7 @@
|
||||
class MOSDPGNotify final : public Message {
|
||||
private:
|
||||
static constexpr int HEAD_VERSION = 7;
|
||||
static constexpr int COMPAT_VERSION = 6;
|
||||
static constexpr int COMPAT_VERSION = 7;
|
||||
|
||||
epoch_t epoch = 0;
|
||||
/// query_epoch is the epoch of the query being responded to, or
|
||||
@ -61,16 +61,7 @@ public:
|
||||
using ceph::encode;
|
||||
header.version = HEAD_VERSION;
|
||||
encode(epoch, payload);
|
||||
if (!HAVE_FEATURE(features, SERVER_OCTOPUS)) {
|
||||
// pretend to be vector<pair<pg_notify_t,PastIntervals>>
|
||||
header.version = 6;
|
||||
encode((uint32_t)pg_list.size(), payload);
|
||||
for (auto& i : pg_list) {
|
||||
encode(i, payload); // this embeds a dup (ignored) PastIntervals
|
||||
encode(i.past_intervals, payload);
|
||||
}
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_OCTOPUS));
|
||||
encode(pg_list, payload);
|
||||
}
|
||||
|
||||
@ -78,17 +69,6 @@ public:
|
||||
auto p = payload.cbegin();
|
||||
using ceph::decode;
|
||||
decode(epoch, p);
|
||||
if (header.version == 6) {
|
||||
// decode legacy vector<pair<pg_notify_t,PastIntervals>>
|
||||
uint32_t num;
|
||||
decode(num, p);
|
||||
pg_list.resize(num);
|
||||
for (unsigned i = 0; i < num; ++i) {
|
||||
decode(pg_list[i], p);
|
||||
decode(pg_list[i].past_intervals, p);
|
||||
}
|
||||
return;
|
||||
}
|
||||
decode(pg_list, p);
|
||||
}
|
||||
void print(std::ostream& out) const override {
|
||||
|
@ -75,12 +75,8 @@ public:
|
||||
using ceph::encode;
|
||||
encode(op, payload);
|
||||
encode(map_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);
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
encode(query_epoch, payload);
|
||||
encode(pgid.pgid, payload);
|
||||
encode(begin, payload);
|
||||
encode(end, payload);
|
||||
|
@ -124,13 +124,10 @@ public:
|
||||
void encode_payload(uint64_t features) override {
|
||||
using ceph::encode;
|
||||
encode(map_epoch, payload);
|
||||
if (HAVE_FEATURE(features, SERVER_LUMINOUS)) {
|
||||
header.version = HEAD_VERSION;
|
||||
encode(min_epoch, payload);
|
||||
encode_trace(payload, features);
|
||||
} else {
|
||||
header.version = 1;
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_OCTOPUS));
|
||||
header.version = HEAD_VERSION;
|
||||
encode(min_epoch, payload);
|
||||
encode_trace(payload, features);
|
||||
encode(reqid, payload);
|
||||
encode(pgid, payload);
|
||||
encode(poid, payload);
|
||||
|
@ -88,13 +88,9 @@ public:
|
||||
void encode_payload(uint64_t features) override {
|
||||
using ceph::encode;
|
||||
encode(map_epoch, payload);
|
||||
if (HAVE_FEATURE(features, SERVER_LUMINOUS)) {
|
||||
header.version = HEAD_VERSION;
|
||||
encode(min_epoch, payload);
|
||||
encode_trace(payload, features);
|
||||
} else {
|
||||
header.version = 1;
|
||||
}
|
||||
header.version = HEAD_VERSION;
|
||||
encode(min_epoch, payload);
|
||||
encode_trace(payload, features);
|
||||
encode(reqid, payload);
|
||||
encode(pgid, payload);
|
||||
encode(ack_type, payload);
|
||||
|
@ -1229,20 +1229,13 @@ bool DaemonServer::_handle_command(
|
||||
return true;
|
||||
}
|
||||
for (auto& con : p->second) {
|
||||
if (HAVE_FEATURE(con->get_features(), SERVER_MIMIC)) {
|
||||
vector<spg_t> pgs = { spgid };
|
||||
con->send_message(new MOSDScrub2(monc->get_fsid(),
|
||||
epoch,
|
||||
pgs,
|
||||
scrubop == "repair",
|
||||
scrubop == "deep-scrub"));
|
||||
} else {
|
||||
vector<pg_t> pgs = { pgid };
|
||||
con->send_message(new MOSDScrub(monc->get_fsid(),
|
||||
pgs,
|
||||
scrubop == "repair",
|
||||
scrubop == "deep-scrub"));
|
||||
}
|
||||
assert(HAVE_FEATURE(con->get_features(), SERVER_OCTOPUS));
|
||||
vector<spg_t> pgs = { spgid };
|
||||
con->send_message(new MOSDScrub2(monc->get_fsid(),
|
||||
epoch,
|
||||
pgs,
|
||||
scrubop == "repair",
|
||||
scrubop == "deep-scrub"));
|
||||
}
|
||||
ss << "instructing pg " << spgid << " on osd." << acting_primary
|
||||
<< " to " << scrubop;
|
||||
|
@ -734,9 +734,7 @@ void MgrMonitor::on_active()
|
||||
return;
|
||||
}
|
||||
mon.clog->debug() << "mgrmap e" << map.epoch << ": " << map;
|
||||
if (!HAVE_FEATURE(mon.get_quorum_con_features(), SERVER_NAUTILUS)) {
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(mon.get_quorum_con_features(), SERVER_NAUTILUS));
|
||||
if (pending_map.always_on_modules == always_on_modules) {
|
||||
return;
|
||||
}
|
||||
|
@ -11392,7 +11392,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
|
||||
err = 0;
|
||||
goto reply;
|
||||
}
|
||||
ceph_assert(osdmap.require_osd_release >= ceph_release_t::luminous);
|
||||
ceph_assert(osdmap.require_osd_release >= ceph_release_t::octopus);
|
||||
if (!osdmap.get_num_up_osds() && !sure) {
|
||||
ss << "Not advisable to continue since no OSDs are up. Pass "
|
||||
<< "--yes-i-really-mean-it if you really wish to continue.";
|
||||
|
@ -47,11 +47,7 @@ void PGMapDigest::encode(bufferlist& bl, uint64_t features) const
|
||||
{
|
||||
// NOTE: see PGMap::encode_digest
|
||||
uint8_t v = 4;
|
||||
if (!HAVE_FEATURE(features, SERVER_MIMIC)) {
|
||||
v = 1;
|
||||
} else if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
|
||||
v = 3;
|
||||
}
|
||||
assert(HAVE_FEATURE(features, SERVER_NAUTILUS));
|
||||
ENCODE_START(v, 1, bl);
|
||||
encode(num_pg, bl);
|
||||
encode(num_pg_active, bl);
|
||||
@ -60,16 +56,7 @@ void PGMapDigest::encode(bufferlist& bl, uint64_t features) const
|
||||
encode(pg_pool_sum, bl, features);
|
||||
encode(pg_sum, bl, features);
|
||||
encode(osd_sum, bl, features);
|
||||
if (v >= 2) {
|
||||
encode(num_pg_by_state, bl);
|
||||
} else {
|
||||
uint32_t n = num_pg_by_state.size();
|
||||
encode(n, bl);
|
||||
for (auto p : num_pg_by_state) {
|
||||
encode((int32_t)p.first, bl);
|
||||
encode(p.second, bl);
|
||||
}
|
||||
}
|
||||
encode(num_pg_by_state, bl);
|
||||
encode(num_pg_by_osd, bl);
|
||||
encode(num_pg_by_pool, bl);
|
||||
encode(osd_last_seq, bl);
|
||||
@ -78,18 +65,15 @@ void PGMapDigest::encode(bufferlist& bl, uint64_t features) const
|
||||
encode(pg_sum_delta, bl, features);
|
||||
encode(stamp_delta, bl);
|
||||
encode(avail_space_by_rule, bl);
|
||||
if (struct_v >= 3) {
|
||||
encode(purged_snaps, bl);
|
||||
}
|
||||
if (struct_v >= 4) {
|
||||
encode(osd_sum_by_class, bl, features);
|
||||
}
|
||||
encode(purged_snaps, bl);
|
||||
encode(osd_sum_by_class, bl, features);
|
||||
ENCODE_FINISH(bl);
|
||||
}
|
||||
|
||||
void PGMapDigest::decode(bufferlist::const_iterator& p)
|
||||
{
|
||||
DECODE_START(4, p);
|
||||
assert(struct_v >= 4);
|
||||
decode(num_pg, p);
|
||||
decode(num_pg_active, p);
|
||||
decode(num_pg_unknown, p);
|
||||
@ -97,16 +81,7 @@ void PGMapDigest::decode(bufferlist::const_iterator& p)
|
||||
decode(pg_pool_sum, p);
|
||||
decode(pg_sum, p);
|
||||
decode(osd_sum, p);
|
||||
if (struct_v >= 2) {
|
||||
decode(num_pg_by_state, p);
|
||||
} else {
|
||||
map<int32_t, int32_t> nps;
|
||||
decode(nps, p);
|
||||
num_pg_by_state.clear();
|
||||
for (auto i : nps) {
|
||||
num_pg_by_state[i.first] = i.second;
|
||||
}
|
||||
}
|
||||
decode(num_pg_by_state, p);
|
||||
decode(num_pg_by_osd, p);
|
||||
decode(num_pg_by_pool, p);
|
||||
decode(osd_last_seq, p);
|
||||
@ -115,12 +90,8 @@ void PGMapDigest::decode(bufferlist::const_iterator& p)
|
||||
decode(pg_sum_delta, p);
|
||||
decode(stamp_delta, p);
|
||||
decode(avail_space_by_rule, p);
|
||||
if (struct_v >= 3) {
|
||||
decode(purged_snaps, p);
|
||||
}
|
||||
if (struct_v >= 4) {
|
||||
decode(osd_sum_by_class, p);
|
||||
}
|
||||
decode(purged_snaps, p);
|
||||
decode(osd_sum_by_class, p);
|
||||
DECODE_FINISH(p);
|
||||
}
|
||||
|
||||
|
@ -1173,12 +1173,7 @@ void PeeringState::send_lease()
|
||||
|
||||
void PeeringState::proc_lease(const pg_lease_t& l)
|
||||
{
|
||||
if (!HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
|
||||
psdout(20) << __func__ << " no-op, upacting_features 0x" << std::hex
|
||||
<< upacting_features << std::dec
|
||||
<< " does not include SERVER_OCTOPUS" << dendl;
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(upacting_features, SERVER_OCTOPUS));
|
||||
if (!is_nonprimary()) {
|
||||
psdout(20) << __func__ << " no-op, !nonprimary" << dendl;
|
||||
return;
|
||||
@ -1220,9 +1215,7 @@ void PeeringState::proc_lease(const pg_lease_t& l)
|
||||
|
||||
void PeeringState::proc_lease_ack(int from, const pg_lease_ack_t& a)
|
||||
{
|
||||
if (!HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(upacting_features, SERVER_OCTOPUS));
|
||||
auto now = pl->get_mnow();
|
||||
bool was_min = false;
|
||||
for (unsigned i = 0; i < acting.size(); ++i) {
|
||||
@ -1248,9 +1241,7 @@ void PeeringState::proc_lease_ack(int from, const pg_lease_ack_t& a)
|
||||
|
||||
void PeeringState::proc_renew_lease()
|
||||
{
|
||||
if (!HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
|
||||
return;
|
||||
}
|
||||
assert(HAVE_FEATURE(upacting_features, SERVER_OCTOPUS));
|
||||
renew_lease(pl->get_mnow());
|
||||
send_lease();
|
||||
schedule_renew_lease();
|
||||
@ -1278,9 +1269,7 @@ void PeeringState::recalc_readable_until()
|
||||
|
||||
bool PeeringState::check_prior_readable_down_osds(const OSDMapRef& map)
|
||||
{
|
||||
if (!HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
|
||||
return false;
|
||||
}
|
||||
assert(HAVE_FEATURE(upacting_features, SERVER_OCTOPUS));
|
||||
bool changed = false;
|
||||
auto p = prior_readable_down_osds.begin();
|
||||
while (p != prior_readable_down_osds.end()) {
|
||||
@ -1674,31 +1663,28 @@ PeeringState::select_replicated_primary(
|
||||
!primary->second.is_incomplete() &&
|
||||
primary->second.last_update >=
|
||||
auth_log_shard->second.log_tail) {
|
||||
if (HAVE_FEATURE(osdmap->get_up_osd_features(), SERVER_NAUTILUS)) {
|
||||
auto approx_missing_objects =
|
||||
primary->second.stats.stats.sum.num_objects_missing;
|
||||
auto auth_version = auth_log_shard->second.last_update.version;
|
||||
auto primary_version = primary->second.last_update.version;
|
||||
if (auth_version > primary_version) {
|
||||
approx_missing_objects += auth_version - primary_version;
|
||||
} else {
|
||||
approx_missing_objects += primary_version - auth_version;
|
||||
}
|
||||
if ((uint64_t)approx_missing_objects >
|
||||
force_auth_primary_missing_objects) {
|
||||
primary = auth_log_shard;
|
||||
ss << "up_primary: " << up_primary << ") has approximate "
|
||||
<< approx_missing_objects
|
||||
<< "(>" << force_auth_primary_missing_objects <<") "
|
||||
<< "missing objects, osd." << auth_log_shard_id
|
||||
<< " selected as primary instead"
|
||||
<< std::endl;
|
||||
} else {
|
||||
ss << "up_primary: " << up_primary << ") selected as primary"
|
||||
<< std::endl;
|
||||
}
|
||||
assert(HAVE_FEATURE(osdmap->get_up_osd_features(), SERVER_NAUTILUS));
|
||||
auto approx_missing_objects =
|
||||
primary->second.stats.stats.sum.num_objects_missing;
|
||||
auto auth_version = auth_log_shard->second.last_update.version;
|
||||
auto primary_version = primary->second.last_update.version;
|
||||
if (auth_version > primary_version) {
|
||||
approx_missing_objects += auth_version - primary_version;
|
||||
} else {
|
||||
ss << "up_primary: " << up_primary << ") selected as primary" << std::endl;
|
||||
approx_missing_objects += primary_version - auth_version;
|
||||
}
|
||||
if ((uint64_t)approx_missing_objects >
|
||||
force_auth_primary_missing_objects) {
|
||||
primary = auth_log_shard;
|
||||
ss << "up_primary: " << up_primary << ") has approximate "
|
||||
<< approx_missing_objects
|
||||
<< "(>" << force_auth_primary_missing_objects <<") "
|
||||
<< "missing objects, osd." << auth_log_shard_id
|
||||
<< " selected as primary instead"
|
||||
<< std::endl;
|
||||
} else {
|
||||
ss << "up_primary: " << up_primary << ") selected as primary"
|
||||
<< std::endl;
|
||||
}
|
||||
} else {
|
||||
ceph_assert(!auth_log_shard->second.is_incomplete());
|
||||
@ -2153,13 +2139,10 @@ bool PeeringState::recoverable(const vector<int> &want) const
|
||||
}
|
||||
|
||||
if (num_want_acting < pool.info.min_size) {
|
||||
const bool recovery_ec_pool_below_min_size=
|
||||
const bool recovery_ec_pool_below_min_size =
|
||||
HAVE_FEATURE(get_osdmap()->get_up_osd_features(), SERVER_OCTOPUS);
|
||||
|
||||
if (pool.info.is_erasure() && !recovery_ec_pool_below_min_size) {
|
||||
psdout(10) << __func__ << " failed, ec recovery below min size not supported by pre-octopus" << dendl;
|
||||
return false;
|
||||
} else if (!cct->_conf.get_val<bool>("osd_allow_recovery_below_min_size")) {
|
||||
assert(recovery_ec_pool_below_min_size);
|
||||
if (!cct->_conf.get_val<bool>("osd_allow_recovery_below_min_size")) {
|
||||
psdout(10) << __func__ << " failed, recovery below min size not enabled" << dendl;
|
||||
return false;
|
||||
}
|
||||
@ -2204,21 +2187,15 @@ void PeeringState::choose_async_recovery_ec(
|
||||
// past the authoritative last_update the same as those equal to it.
|
||||
version_t auth_version = auth_info.last_update.version;
|
||||
version_t candidate_version = shard_info.last_update.version;
|
||||
if (HAVE_FEATURE(osdmap->get_up_osd_features(), SERVER_NAUTILUS)) {
|
||||
auto approx_missing_objects =
|
||||
shard_info.stats.stats.sum.num_objects_missing;
|
||||
if (auth_version > candidate_version) {
|
||||
approx_missing_objects += auth_version - candidate_version;
|
||||
}
|
||||
if (static_cast<uint64_t>(approx_missing_objects) >
|
||||
cct->_conf.get_val<uint64_t>("osd_async_recovery_min_cost")) {
|
||||
candidates_by_cost.emplace(approx_missing_objects, shard_i);
|
||||
}
|
||||
} else {
|
||||
if (auth_version > candidate_version &&
|
||||
(auth_version - candidate_version) > cct->_conf.get_val<uint64_t>("osd_async_recovery_min_cost")) {
|
||||
candidates_by_cost.insert(make_pair(auth_version - candidate_version, shard_i));
|
||||
}
|
||||
assert(HAVE_FEATURE(osdmap->get_up_osd_features(), SERVER_NAUTILUS));
|
||||
auto approx_missing_objects =
|
||||
shard_info.stats.stats.sum.num_objects_missing;
|
||||
if (auth_version > candidate_version) {
|
||||
approx_missing_objects += auth_version - candidate_version;
|
||||
}
|
||||
if (static_cast<uint64_t>(approx_missing_objects) >
|
||||
cct->_conf.get_val<uint64_t>("osd_async_recovery_min_cost")) {
|
||||
candidates_by_cost.emplace(approx_missing_objects, shard_i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2264,28 +2241,17 @@ void PeeringState::choose_async_recovery_replicated(
|
||||
// logs plus historical missing objects as the cost of recovery
|
||||
version_t auth_version = auth_info.last_update.version;
|
||||
version_t candidate_version = shard_info.last_update.version;
|
||||
if (HAVE_FEATURE(osdmap->get_up_osd_features(), SERVER_NAUTILUS)) {
|
||||
auto approx_missing_objects =
|
||||
shard_info.stats.stats.sum.num_objects_missing;
|
||||
if (auth_version > candidate_version) {
|
||||
approx_missing_objects += auth_version - candidate_version;
|
||||
} else {
|
||||
approx_missing_objects += candidate_version - auth_version;
|
||||
}
|
||||
if (static_cast<uint64_t>(approx_missing_objects) >
|
||||
cct->_conf.get_val<uint64_t>("osd_async_recovery_min_cost")) {
|
||||
candidates_by_cost.emplace(approx_missing_objects, shard_i);
|
||||
}
|
||||
assert(HAVE_FEATURE(osdmap->get_up_osd_features(), SERVER_NAUTILUS));
|
||||
auto approx_missing_objects =
|
||||
shard_info.stats.stats.sum.num_objects_missing;
|
||||
if (auth_version > candidate_version) {
|
||||
approx_missing_objects += auth_version - candidate_version;
|
||||
} else {
|
||||
size_t approx_entries;
|
||||
if (auth_version > candidate_version) {
|
||||
approx_entries = auth_version - candidate_version;
|
||||
} else {
|
||||
approx_entries = candidate_version - auth_version;
|
||||
}
|
||||
if (approx_entries > cct->_conf.get_val<uint64_t>("osd_async_recovery_min_cost")) {
|
||||
candidates_by_cost.insert(make_pair(approx_entries, shard_i));
|
||||
}
|
||||
approx_missing_objects += candidate_version - auth_version;
|
||||
}
|
||||
if (static_cast<uint64_t>(approx_missing_objects) >
|
||||
cct->_conf.get_val<uint64_t>("osd_async_recovery_min_cost")) {
|
||||
candidates_by_cost.emplace(approx_missing_objects, shard_i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2757,10 +2723,9 @@ void PeeringState::activate(
|
||||
purged.intersection_of(to_trim, info.purged_snaps);
|
||||
to_trim.subtract(purged);
|
||||
|
||||
if (HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
|
||||
renew_lease(pl->get_mnow());
|
||||
// do not schedule until we are actually activated
|
||||
}
|
||||
assert(HAVE_FEATURE(upacting_features, SERVER_OCTOPUS));
|
||||
renew_lease(pl->get_mnow());
|
||||
// do not schedule until we are actually activated
|
||||
|
||||
// adjust purged_snaps: PG may have been inactive while snaps were pruned
|
||||
// from the removed_snaps_queue in the osdmap. update local purged_snaps
|
||||
@ -6323,15 +6288,14 @@ void PeeringState::Active::all_activated_and_committed()
|
||||
ceph_assert(!ps->acting_recovery_backfill.empty());
|
||||
ceph_assert(ps->blocked_by.empty());
|
||||
|
||||
if (HAVE_FEATURE(ps->upacting_features, SERVER_OCTOPUS)) {
|
||||
// this is overkill when the activation is quick, but when it is slow it
|
||||
// is important, because the lease was renewed by the activate itself but we
|
||||
// don't know how long ago that was, and simply scheduling now may leave
|
||||
// a gap in lease coverage. keep it simple and aggressively renew.
|
||||
ps->renew_lease(pl->get_mnow());
|
||||
ps->send_lease();
|
||||
ps->schedule_renew_lease();
|
||||
}
|
||||
assert(HAVE_FEATURE(ps->upacting_features, SERVER_OCTOPUS));
|
||||
// this is overkill when the activation is quick, but when it is slow it
|
||||
// is important, because the lease was renewed by the activate itself but we
|
||||
// don't know how long ago that was, and simply scheduling now may leave
|
||||
// a gap in lease coverage. keep it simple and aggressively renew.
|
||||
ps->renew_lease(pl->get_mnow());
|
||||
ps->send_lease();
|
||||
ps->schedule_renew_lease();
|
||||
|
||||
// Degraded?
|
||||
ps->update_calc_stats();
|
||||
|
@ -798,11 +798,8 @@ void PrimaryLogPG::maybe_force_recovery()
|
||||
|
||||
bool PrimaryLogPG::check_laggy(OpRequestRef& op)
|
||||
{
|
||||
if (!HAVE_FEATURE(recovery_state.get_min_upacting_features(),
|
||||
SERVER_OCTOPUS)) {
|
||||
dout(20) << __func__ << " not all upacting has SERVER_OCTOPUS" << dendl;
|
||||
return true;
|
||||
}
|
||||
assert(HAVE_FEATURE(recovery_state.get_min_upacting_features(),
|
||||
SERVER_OCTOPUS));
|
||||
if (state_test(PG_STATE_WAIT)) {
|
||||
dout(10) << __func__ << " PG is WAIT state" << dendl;
|
||||
} else if (!state_test(PG_STATE_LAGGY)) {
|
||||
@ -833,10 +830,8 @@ bool PrimaryLogPG::check_laggy(OpRequestRef& op)
|
||||
|
||||
bool PrimaryLogPG::check_laggy_requeue(OpRequestRef& op)
|
||||
{
|
||||
if (!HAVE_FEATURE(recovery_state.get_min_upacting_features(),
|
||||
SERVER_OCTOPUS)) {
|
||||
return true;
|
||||
}
|
||||
assert(HAVE_FEATURE(recovery_state.get_min_upacting_features(),
|
||||
SERVER_OCTOPUS));
|
||||
if (!state_test(PG_STATE_WAIT) && !state_test(PG_STATE_LAGGY)) {
|
||||
return true; // not laggy
|
||||
}
|
||||
|
@ -1195,13 +1195,12 @@ void ReplicatedBackend::calc_head_subsets(
|
||||
if (size)
|
||||
data_subset.insert(0, size);
|
||||
|
||||
if (HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS)) {
|
||||
const auto it = missing.get_items().find(head);
|
||||
assert(it != missing.get_items().end());
|
||||
data_subset.intersection_of(it->second.clean_regions.get_dirty_regions());
|
||||
dout(10) << "calc_head_subsets " << head
|
||||
<< " data_subset " << data_subset << dendl;
|
||||
}
|
||||
assert(HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS));
|
||||
const auto it = missing.get_items().find(head);
|
||||
assert(it != missing.get_items().end());
|
||||
data_subset.intersection_of(it->second.clean_regions.get_dirty_regions());
|
||||
dout(10) << "calc_head_subsets " << head
|
||||
<< " data_subset " << data_subset << dendl;
|
||||
|
||||
if (get_parent()->get_pool().allow_incomplete_clones()) {
|
||||
dout(10) << __func__ << ": caching (was) enabled, skipping clone subsets" << dendl;
|
||||
@ -1434,8 +1433,8 @@ void ReplicatedBackend::prepare_pull(
|
||||
// pulling head or unversioned object.
|
||||
// always pull the whole thing.
|
||||
recovery_info.copy_subset.insert(0, (uint64_t)-1);
|
||||
if (HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS))
|
||||
recovery_info.copy_subset.intersection_of(missing_iter->second.clean_regions.get_dirty_regions());
|
||||
assert(HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS));
|
||||
recovery_info.copy_subset.intersection_of(missing_iter->second.clean_regions.get_dirty_regions());
|
||||
recovery_info.size = ((uint64_t)-1);
|
||||
recovery_info.object_exist = missing_iter->second.clean_regions.object_is_exist();
|
||||
}
|
||||
@ -1448,8 +1447,7 @@ void ReplicatedBackend::prepare_pull(
|
||||
op.recovery_info.soid = soid;
|
||||
op.recovery_info.version = v;
|
||||
op.recovery_progress.data_complete = false;
|
||||
op.recovery_progress.omap_complete = !missing_iter->second.clean_regions.omap_is_dirty()
|
||||
&& HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS);
|
||||
op.recovery_progress.omap_complete = !missing_iter->second.clean_regions.omap_is_dirty();
|
||||
op.recovery_progress.data_recovered_to = 0;
|
||||
op.recovery_progress.first = true;
|
||||
|
||||
@ -1576,8 +1574,7 @@ int ReplicatedBackend::prep_push(
|
||||
pi.recovery_info.ss = pop->recovery_info.ss;
|
||||
pi.recovery_info.version = version;
|
||||
pi.recovery_info.object_exist = missing_iter->second.clean_regions.object_is_exist();
|
||||
pi.recovery_progress.omap_complete = !missing_iter->second.clean_regions.omap_is_dirty() &&
|
||||
HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS);
|
||||
pi.recovery_progress.omap_complete = !missing_iter->second.clean_regions.omap_is_dirty();
|
||||
pi.lock_manager = std::move(lock_manager);
|
||||
|
||||
ObjectRecoveryProgress new_progress;
|
||||
|
@ -1,6 +1,7 @@
|
||||
$ monmaptool --create mymonmap
|
||||
monmaptool: monmap file mymonmap
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to mymonmap (0 monitors)
|
||||
|
||||
$ ORIG_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
|
||||
@ -20,7 +21,7 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
0: v1:2.3.4.5:6789/0 mon.foo
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
$ monmaptool --create mymonmap
|
||||
monmaptool: monmap file mymonmap
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to mymonmap (0 monitors)
|
||||
|
||||
$ ORIG_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
|
||||
@ -23,7 +24,7 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
0: v1:2.3.4.5:6789/0 mon.foo
|
||||
1: [v2:172.21.15.68:6791/0,v1:172.21.15.68:6792/0] mon.fiz
|
||||
|
@ -1,6 +1,7 @@
|
||||
$ monmaptool --create --add foo 2.3.4.5:6789 mymonmap
|
||||
monmaptool: monmap file mymonmap
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to mymonmap (1 monitors)
|
||||
|
||||
$ ORIG_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
|
||||
@ -17,7 +18,7 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
0: v1:2.3.4.5:6789/0 mon.foo
|
||||
|
||||
@ -27,6 +28,7 @@
|
||||
$ monmaptool --create --clobber mymonmap
|
||||
monmaptool: monmap file mymonmap
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to mymonmap (0 monitors)
|
||||
|
||||
$ NEW_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
|
||||
@ -38,5 +40,5 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
|
@ -1,6 +1,7 @@
|
||||
$ monmaptool --create mymonmap
|
||||
monmaptool: monmap file mymonmap
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to mymonmap (0 monitors)
|
||||
|
||||
$ monmaptool --print mymonmap
|
||||
@ -9,7 +10,7 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
|
||||
$ monmaptool --print -- mymonmap
|
||||
@ -18,5 +19,5 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
|
@ -1,6 +1,7 @@
|
||||
$ monmaptool --create --add foo 2.3.4.5:6789 mymonmap
|
||||
monmaptool: monmap file mymonmap
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to mymonmap (1 monitors)
|
||||
|
||||
$ monmaptool --print mymonmap
|
||||
@ -9,6 +10,6 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
0: v1:2.3.4.5:6789/0 mon.foo
|
||||
|
@ -1,6 +1,7 @@
|
||||
$ monmaptool --create --add a 10.10.10.10:1234 /tmp/test.monmap.1234
|
||||
monmaptool: monmap file /tmp/test.monmap.1234
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to /tmp/test.monmap.1234 (1 monitors)
|
||||
|
||||
$ monmaptool --feature-list --feature-list plain --feature-list parseable /tmp/test.monmap.1234
|
||||
|
@ -1,6 +1,7 @@
|
||||
$ monmaptool --create --add foo 2.3.4.5:6789 mymonmap
|
||||
monmaptool: monmap file mymonmap
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to mymonmap (1 monitors)
|
||||
|
||||
$ ORIG_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
|
||||
@ -18,7 +19,7 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
0: v1:2.3.4.5:6789/0 mon.foo
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
$ monmaptool --create --add foo 2.3.4.5:6789 mymonmap
|
||||
monmaptool: monmap file mymonmap
|
||||
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
setting min_mon_release = octopus
|
||||
monmaptool: writing epoch 0 to mymonmap (1 monitors)
|
||||
|
||||
$ ORIG_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
|
||||
@ -16,7 +17,7 @@
|
||||
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
|
||||
last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
|
||||
min_mon_release 0 (unknown)
|
||||
min_mon_release 15 (octopus)
|
||||
election_strategy: 1
|
||||
|
||||
$ NEW_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
|
||||
|
@ -195,7 +195,7 @@ int main(int argc, const char **argv)
|
||||
bool show_features = false;
|
||||
bool generate = false;
|
||||
bool filter = false;
|
||||
ceph_release_t min_mon_release{0};
|
||||
ceph_release_t min_mon_release = ceph_release_t::unknown;
|
||||
map<string,entity_addr_t> add;
|
||||
map<string,entity_addrvec_t> addv;
|
||||
list<string> rm;
|
||||
@ -348,6 +348,9 @@ int main(int argc, const char **argv)
|
||||
}
|
||||
monmap.strategy = static_cast<MonMap::election_strategy>(
|
||||
g_conf().get_val<uint64_t>("mon_election_default_strategy"));
|
||||
if (min_mon_release == ceph_release_t::unknown) {
|
||||
min_mon_release = ceph_release_t::octopus;
|
||||
}
|
||||
// TODO: why do we not use build_initial in our normal path here!?!?!
|
||||
modified = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user