pending_inc.new_pools[i.first].flags |= pg_pool_t::FLAG_CREATING;
}
}
+ // adjust blacklist items to all be TYPE_ANY
+ for (auto& i : tmp.blacklist) {
+ auto a = i.first;
+ a.set_type(entity_addr_t::TYPE_ANY);
+ pending_inc.new_blacklist[a] = i.second;
+ }
}
}
epoch_t OSDMonitor::blacklist(const entity_addrvec_t& av, utime_t until)
{
dout(10) << "blacklist " << av << " until " << until << dendl;
- for (auto& a : av.v) {
+ for (auto a : av.v) {
+ if (osdmap.require_osd_release >= CEPH_RELEASE_NAUTILUS) {
+ a.set_type(entity_addr_t::TYPE_ANY);
+ } else {
+ a.set_type(entity_addr_t::TYPE_LEGACY);
+ }
pending_inc.new_blacklist[a] = until;
}
return pending_inc.epoch;
}
-epoch_t OSDMonitor::blacklist(const entity_addr_t& a, utime_t until)
+epoch_t OSDMonitor::blacklist(entity_addr_t a, utime_t until)
{
+ if (osdmap.require_osd_release >= CEPH_RELEASE_NAUTILUS) {
+ a.set_type(entity_addr_t::TYPE_ANY);
+ } else {
+ a.set_type(entity_addr_t::TYPE_LEGACY);
+ }
dout(10) << "blacklist " << a << " until " << until << dendl;
pending_inc.new_blacklist[a] = until;
return pending_inc.epoch;
goto reply;
}
else {
+ if (osdmap.require_osd_release >= CEPH_RELEASE_NAUTILUS) {
+ // always blacklist type ANY
+ addr.set_type(entity_addr_t::TYPE_ANY);
+ } else {
+ addr.set_type(entity_addr_t::TYPE_LEGACY);
+ }
+
string blacklistop;
cmd_getval(cct, cmdmap, "blacklistop", blacklistop);
if (blacklistop == "add") {
int get_full_from_pinned_map(version_t ver, bufferlist& bl);
epoch_t blacklist(const entity_addrvec_t& av, utime_t until);
- epoch_t blacklist(const entity_addr_t& a, utime_t until);
+ epoch_t blacklist(entity_addr_t a, utime_t until);
void dump_info(Formatter *f);
int dump_osd_metadata(int osd, Formatter *f, ostream *err);