~ubuntu-branches/ubuntu/raring/ceph/raring

« back to all changes in this revision

Viewing changes to src/mon/Elector.cc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-06-08 15:54:37 UTC
  • mfrom: (0.3.9)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: package-import@ubuntu.com-20120608155437-30vek4y2gu92vhad
Tags: upstream-0.44.1
ImportĀ upstreamĀ versionĀ 0.44.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
{
224
224
  dout(5) << "handle_ack from " << m->get_source() << dendl;
225
225
  int from = m->get_source().num();
226
 
  
 
226
 
227
227
  assert(m->epoch % 2 == 1); // election
228
228
  if (m->epoch > epoch) {
229
229
    dout(5) << "woah, that's a newer epoch, i must have rebooted.  bumping and re-starting!" << dendl;
293
293
        m->put();
294
294
        return;
295
295
      }
 
296
      if (m->get_source().num() >= mon->monmap->size()) {
 
297
        dout(5) << " ignoring bogus election message with bad mon rank " << m->get_source() << dendl;
 
298
        m->put();
 
299
        return;
 
300
      }
 
301
 
296
302
      MMonElection *em = (MMonElection*)m;
297
303
 
298
304
      // assume an old message encoding would have matched