void MonmapMonitor::create_initial()
{
- dout(10) << "create_initial using current monmap" << dendl;
+ dout(10) << __func__ << " using current monmap" << dendl;
pending_map = *mon->monmap;
pending_map.epoch = 1;
+
+ if (g_conf->mon_debug_no_initial_persistent_features) {
+ derr << __func__ << " mon_debug_no_initial_persistent_features=true"
+ << dendl;
+ } else {
+ // initialize with default persistent features for new clusters
+ pending_map.persistent_features = ceph::features::mon::get_persistent();
+ }
}
void MonmapMonitor::update_from_paxos(bool *need_bootstrap)
assert(ret == 0);
assert(monmap_bl.length());
- dout(10) << "update_from_paxos got " << version << dendl;
+ dout(10) << __func__ << " got " << version << dendl;
mon->monmap->decode(monmap_bl);
if (mon->store->exists("mkfs", "monmap")) {
pending_map = *mon->monmap;
pending_map.epoch++;
pending_map.last_changed = ceph_clock_now();
- dout(10) << "create_pending monmap epoch " << pending_map.epoch << dendl;
+ dout(10) << __func__ << " monmap epoch " << pending_map.epoch << dendl;
}
void MonmapMonitor::encode_pending(MonitorDBStore::TransactionRef t)
{
- dout(10) << "encode_pending epoch " << pending_map.epoch << dendl;
+ dout(10) << __func__ << " epoch " << pending_map.epoch << dendl;
assert(mon->monmap->epoch + 1 == pending_map.epoch ||
pending_map.epoch == 1); // special case mkfs!
mon->has_ever_joined = true;
}
- if (mon->is_leader())
- mon->clog->info() << "monmap " << *mon->monmap;
+ if (mon->is_leader()) {
+ mon->clog->debug() << "monmap " << *mon->monmap;
+ }
apply_mon_features(mon->get_quorum_mon_features());
}
if (prefix == "mon stat") {
mon->monmap->print_summary(ss);
- ss << ", election epoch " << mon->get_epoch() << ", quorum " << mon->get_quorum()
- << " " << mon->get_quorum_names();
+ ss << ", election epoch " << mon->get_epoch() << ", leader "
+ << mon->get_leader() << " " << mon->get_leader_name()
+ << ", quorum " << mon->get_quorum() << " " << mon->get_quorum_names();
rdata.append(ss);
ss.str("");
r = 0;
if (p != mon->monmap)
delete p;
- } else if (prefix == "mon feature list") {
+ } else if (prefix == "mon feature ls") {
bool list_with_value = false;
string with_value;
bool MonmapMonitor::prepare_update(MonOpRequestRef op)
{
PaxosServiceMessage *m = static_cast<PaxosServiceMessage*>(op->get_req());
- dout(7) << "prepare_update " << *m << " from " << m->get_orig_source_inst() << dendl;
+ dout(7) << __func__ << " " << *m << " from " << m->get_orig_source_inst() << dendl;
switch (m->get_type()) {
case MSG_MON_COMMAND:
bool MonmapMonitor::preprocess_join(MonOpRequestRef op)
{
MMonJoin *join = static_cast<MMonJoin*>(op->get_req());
- dout(10) << "preprocess_join " << join->name << " at " << join->addr << dendl;
+ dout(10) << __func__ << " " << join->name << " at " << join->addr << dendl;
MonSession *session = join->get_session();
if (!session ||
return true;
}
-void MonmapMonitor::tick()
-{
-}
-
void MonmapMonitor::get_health(list<pair<health_status_t, string> >& summary,
list<pair<health_status_t, string> > *detail,
CephContext *cct) const