pending_inc.new_xinfo[target_osd] = osdmap.osd_xinfo[target_osd];
}
pending_inc.new_xinfo[target_osd].dead_epoch = m->get_epoch();
- wait_for_finished_proposal(
+ wait_for_commit(
op,
new LambdaContext(
[op, this] (int r) {
if (HAVE_FEATURE(m->get_connection()->get_features(), SERVER_OCTOPUS)) {
auto reply = make_message<MRemoveSnaps>();
reply->snaps = m->snaps;
- wait_for_finished_proposal(op, new C_ReplyOp(this, op, reply));
+ wait_for_commit(op, new C_ReplyOp(this, op, reply));
}
return true;
pending_inc.new_flags = osdmap.get_flags();
pending_inc.new_flags |= flag;
ss << OSDMap::get_flag_string(flag) << " is set";
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, ss.str(),
get_last_committed() + 1));
return true;
}
pending_inc.new_flags = osdmap.get_flags();
pending_inc.new_flags &= ~flag;
ss << OSDMap::get_flag_string(flag) << " is unset";
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, ss.str(),
get_last_committed() + 1));
return true;
}
}
pending_inc.crush.clear();
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd crush set-device-class") {
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
ss << "set osd(s) " << updated << " to class '" << device_class << "'";
getline(ss, rs);
- wait_for_finished_proposal(
+ wait_for_commit(
op,
new Monitor::C_Command(mon,op, 0, rs, get_last_committed() + 1));
return true;
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
ss << "done removing class of osd(s): " << updated;
getline(ss, rs);
- wait_for_finished_proposal(
+ wait_for_commit(
op,
new Monitor::C_Command(mon,op, 0, rs, get_last_committed() + 1));
return true;
ss << action << " item id " << osdid << " name '" << osd_name << "' weight "
<< weight << " at location " << loc << " to crush map";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
<< "' weight " << weight
<< " at location " << loc << " to crush map";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
}
pending_inc.crush.clear();
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
}
ss << "swapped bucket of " << source << " to " << dest;
pending_inc.crush.clear();
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
- wait_for_finished_proposal(op,
+ wait_for_commit(op,
new Monitor::C_Command(mon, op, err, ss.str(),
get_last_committed() + 1));
return true;
err = 0;
}
}
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, err, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, err, ss.str(),
get_last_committed() + 1));
return true;
} else if (prefix == "osd crush rm" ||
err = 0;
ss << "device '" << name << "' does not appear in the crush map";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
}
pending_inc.new_crush_node_flags[id] = 0;
ss << "removed item id " << id << " name '" << name << "' from crush map";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
}
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
ss << "reweighted crush hierarchy";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd crush reweight") {
ss << "reweighted item id " << id << " name '" << name << "' to " << w
<< " in crush map";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd crush reweight-subtree") {
ss << "reweighted subtree id " << id << " name '" << name << "' to " << w
<< " in crush map";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd crush tunables") {
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
ss << "adjusted tunables profile to " << profile;
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd crush set-tunable") {
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
ss << "adjusted tunable " << tunable << " to " << value;
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else {
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
pending_inc.crush.clear();
newcrush.encode(pending_inc.crush, mon.get_quorum_con_features());
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
pending_inc.new_max_osd = newmax;
ss << "set new max_osd = " << pending_inc.new_max_osd;
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
pending_inc.new_nearfull_ratio = n;
ss << prefix << " " << n;
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd set-require-min-compat-client") {
ss << "set require_min_compat_client to " << vno;
pending_inc.new_require_min_compat_client = vno;
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd pause") {
}
if (any) {
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, err, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, err, rs,
get_last_committed() + 1));
return true;
}
}
if (any) {
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, err, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, err, rs,
get_last_committed() + 1));
return true;
}
ss << "pool of " << pgid << " is pending removal";
err = -ENOENT;
getline(ss, rs);
- wait_for_finished_proposal(op,
+ wait_for_commit(op,
new Monitor::C_Command(mon, op, err, rs, get_last_committed() + 1));
return true;
}
pending_inc.new_primary_affinity[id] = ww;
ss << "set osd." << id << " primary-affinity to " << w << " (" << std::ios::hex << ww << std::ios::dec << ")";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else {
pending_inc.new_weight[id] = ww;
ss << "reweighted osd." << id << " to " << w << " (" << std::hex << ww << std::dec << ")";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else {
goto reply;
}
pending_inc.new_weight.insert(weights.begin(), weights.end());
- wait_for_finished_proposal(
+ wait_for_commit(
op,
new Monitor::C_Command(mon, op, 0, rs, rdata, get_last_committed() + 1));
return true;
pending_inc.new_lost[id] = e;
ss << "marked osd lost in epoch " << e;
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
}
}
getline(ss, rs);
- wait_for_finished_proposal(op,
+ wait_for_commit(op,
new Monitor::C_Command(mon, op, 0, rs, get_last_committed() + 1));
force_immediate_propose();
return true;
goto reply;
}
- wait_for_finished_proposal(op,
+ wait_for_commit(op,
new Monitor::C_Command(mon, op, 0, rs, rdata,
get_last_committed() + 1));
force_immediate_propose();
ss << new_id;
rdata.append(ss);
}
- wait_for_finished_proposal(op,
+ wait_for_commit(op,
new Monitor::C_Command(mon, op, 0, rs, rdata,
get_last_committed() + 1));
return true;
}
ss << " removed all blocklist entries";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd blocklist" ||
ss << "blocklisting " << addr << " until " << expires << " (" << d << " sec)";
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (blocklistop == "rm") {
pending_inc.new_range_blocklist))) {
ss << "un-blocklisting " << addr;
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
}
ss << "created pool " << poolstr << " snap " << snapname;
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd pool rmsnap") {
ss << "already removed pool " << poolstr << " snap " << snapname;
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd pool create") {
ss << "pool '" << poolstr << "' created";
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
<< cpp_strerror(ret);
}
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, ret, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, ret, rs,
get_last_committed() + 1));
return true;
goto reply;
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd tier add") {
np->set_snap_epoch(pending_inc.epoch); // tier will update to our snap info
ntp->tier_of = pool_id;
ss << "pool '" << tierpoolstr << "' is now (or already was) a tier of '" << poolstr << "'";
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, ss.str(),
get_last_committed() + 1));
return true;
} else if (prefix == "osd tier remove" ||
np->tiers.erase(tierpool_id);
ntp->clear_tier();
ss << "pool '" << tierpoolstr << "' is now (or already was) not a tier of '" << poolstr << "'";
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, ss.str(),
get_last_committed() + 1));
return true;
} else if (prefix == "osd tier set-overlay") {
ss << "overlay for '" << poolstr << "' is now (or already was) '" << overlaypoolstr << "'";
if (overlay_p->cache_mode == pg_pool_t::CACHEMODE_NONE)
ss <<" (WARNING: overlay pool cache_mode is still NONE)";
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, ss.str(),
get_last_committed() + 1));
return true;
} else if (prefix == "osd tier remove-overlay" ||
np->clear_write_tier();
np->set_last_force_op_resend(pending_inc.epoch);
ss << "there is now (or already was) no overlay for '" << poolstr << "'";
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, ss.str(),
get_last_committed() + 1));
return true;
} else if (prefix == "osd tier cache-mode") {
base_pool->write_tier == pool_id)
ss <<" (WARNING: pool is still configured as read or write tier)";
}
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, ss.str(),
get_last_committed() + 1));
return true;
} else if (prefix == "osd tier add-cache") {
ntp->hit_set_params = hsp;
ntp->target_max_bytes = size;
ss << "pool '" << tierpoolstr << "' is now (or already was) a cache tier of '" << poolstr << "'";
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, ss.str(),
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, ss.str(),
get_last_committed() + 1));
return true;
} else if (prefix == "osd pool set-quota") {
}
ss << "set-quota " << field << " = " << value << " for pool " << poolstr;
rs = ss.str();
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;
} else if (prefix == "osd pool application enable" ||
update:
getline(ss, rs);
- wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ wait_for_commit(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
return true;