v0.8
- kill fill_trace
- return extra inode(s) in reply (namely, unlink)?
-- allow mon to log messages
- - log client mount successes, failures
- - mon elections
- - ?
-- test deep mounts on kclient
- store root inode on mds
- allow chmod/whatever of root inode
// a mon just started up, call a new election so they can rejoin!
dout(5) << " got propose from old epoch, quorum is " << mon->quorum
<< ", " << m->get_source() << " must have just started" << dendl;
- mon->call_election();//start();
+ mon->call_election(false);//start();
} else {
dout(5) << " ignoring old propose" << dendl;
delete m;
} else {
// wait, i should win!
if (!electing_me)
- mon->call_election();//start();
+ mon->call_election(false);//start();
}
} else {
// they would win over me
if (m->epoch > epoch) {
dout(5) << "woah, that's a newer epoch, i must have rebooted. bumping and re-starting!" << dendl;
bump_epoch(m->epoch);
- mon->call_election();//start();
+ mon->call_election(false);//start();
delete m;
return;
}
if (m->epoch != epoch + 1) {
dout(5) << "woah, that's a funny epoch, i must have rebooted. bumping and re-starting!" << dendl;
bump_epoch(m->epoch);
- mon->call_election();//start();
+ mon->call_election(true);//start();
delete m;
return;
}
}
-void Monitor::call_election()
+void Monitor::call_election(bool is_new)
{
if (monmap->size() == 1) return;
+ if (is_new) {
+ stringstream ss;
+ ss << "mon" << whoami << " calling new monitor election";
+ logclient.log(LOG_INFO, ss);
+ }
+
dout(10) << "call_election" << dendl;
state = STATE_STARTING;
mon_epoch = epoch;
quorum = active;
dout(10) << "win_election, epoch " << mon_epoch << " quorum is " << quorum << dendl;
+
+ stringstream ss;
+ ss << "mon" << whoami << " won leader election";
+ logclient.log(LOG_INFO, ss);
for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
(*p)->leader_init();
return quorum.size() == monmap->size();
}
- void call_election(); // initiate election
+ void call_election(bool is_new=true); // initiate election
void win_election(epoch_t epoch, set<int>& q); // end election (called by Elector)
void lose_election(epoch_t epoch, set<int>& q, int l); // end election (called by Elector)