~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/mon/OSDMonitor.cc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-08-27 08:23:21 UTC
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20120827082321-2cfej6ddvk63vsqq
Tags: upstream-0.48.1
ImportĀ upstreamĀ versionĀ 0.48.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
889
889
    goto ignore;
890
890
  }
891
891
 
892
 
  if (osdmap.is_up(from) &&
893
 
      osdmap.get_inst(from) == m->get_orig_source_inst() &&
894
 
      osdmap.get_up_thru(from) >= m->want) {
 
892
  if (!osdmap.is_up(from) ||
 
893
      osdmap.get_inst(from) != m->get_orig_source_inst()) {
 
894
    dout(7) << "preprocess_alive ignoring alive message from down " << m->get_orig_source_inst() << dendl;
 
895
    goto ignore;
 
896
  }
 
897
 
 
898
  if (osdmap.get_up_thru(from) >= m->want) {
895
899
    // yup.
896
900
    dout(7) << "preprocess_alive want up_thru " << m->want << " dup from " << m->get_orig_source_inst() << dendl;
897
901
    _reply_map(m, m->version);
898
902
    return true;
899
903
  }
900
 
  
 
904
 
901
905
  dout(10) << "preprocess_alive want up_thru " << m->want
902
906
           << " from " << m->get_orig_source_inst() << dendl;
903
907
  return false;
937
941
{
938
942
  dout(10) << "preprocess_pgtemp " << *m << dendl;
939
943
  vector<int> empty;
 
944
  int from = m->get_orig_source().num();
940
945
 
941
946
  // check caps
942
947
  MonSession *session = m->get_session();
948
953
    goto ignore;
949
954
  }
950
955
 
 
956
  if (!osdmap.is_up(from) ||
 
957
      osdmap.get_inst(from) != m->get_orig_source_inst()) {
 
958
    dout(7) << "ignoring pgtemp message from down " << m->get_orig_source_inst() << dendl;
 
959
    goto ignore;
 
960
  }
 
961
 
951
962
  for (map<pg_t,vector<int> >::iterator p = m->pg_temp.begin(); p != m->pg_temp.end(); p++) {
952
963
    dout(20) << " " << p->first
953
964
             << (osdmap.pg_temp->count(p->first) ? (*osdmap.pg_temp)[p->first] : empty)
2126
2137
        } else if (osdmap.is_up(osd)) {
2127
2138
          ss << "osd." << osd << " is still up";
2128
2139
        } else {
2129
 
          pending_inc.new_state[osd] = CEPH_OSD_EXISTS;
 
2140
          pending_inc.new_state[osd] = osdmap.get_state(osd);
2130
2141
          if (any)
2131
2142
            ss << ", osd." << osd;
2132
2143
          else