MCPcopy Create free account
hub / github.com/ceph/ceph / remove

Method remove

src/mon/MonMap.h:242–260  ·  view source on GitHub ↗

* Remove monitor from the monmap * * @param name Monitor name (i.e., 'foo' in 'mon.foo') */

Source from the content-addressed store, hash-verified

240 * @param name Monitor name (i.e., 'foo' in 'mon.foo')
241 */
242 void remove(const std::string &name) {
243 // this must match what we do in ConnectionTracker::notify_rank_removed
244 ceph_assert(mon_info.count(name));
245 int rank = get_rank(name);
246 mon_info.erase(name);
247 disallowed_leaders.erase(name);
248 ceph_assert(mon_info.count(name) == 0);
249 if (rank >= 0 ) {
250 removed_ranks.insert(rank);
251 }
252 if (get_required_features().contains_all(
253 ceph::features::mon::FEATURE_NAUTILUS)) {
254 ranks.erase(std::find(ranks.begin(), ranks.end(), name));
255 ceph_assert(ranks.size() == mon_info.size());
256 } else {
257 calc_legacy_ranks();
258 }
259 calc_addr_mons();
260 }
261
262 /**
263 * Rename monitor from @p oldname to @p newname

Callers 15

~MDLogMethod · 0.45
~MDSRankMethod · 0.45
shutdownMethod · 0.45
~ServerMethod · 0.45
~PurgeQueueMethod · 0.45
_commit_opsMethod · 0.45
~SessionMapMethod · 0.45
~MDCacheMethod · 0.45
_fragment_committedMethod · 0.45
shutdownMethod · 0.45

Calls 8

findFunction · 0.85
countMethod · 0.45
eraseMethod · 0.45
insertMethod · 0.45
contains_allMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected