diff --git a/src/include/rados.h b/src/include/rados.h index 6d5247f2e81..e024d68bc42 100644 --- a/src/include/rados.h +++ b/src/include/rados.h @@ -12,7 +12,7 @@ * osdmap encoding versions */ #define CEPH_OSDMAP_INC_VERSION 5 -#define CEPH_OSDMAP_INC_VERSION_EXT 5 +#define CEPH_OSDMAP_INC_VERSION_EXT 6 #define CEPH_OSDMAP_VERSION 5 #define CEPH_OSDMAP_VERSION_EXT 5 diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 1166f499000..48a3d59b143 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -174,10 +174,10 @@ void OSDMonitor::encode_pending(bufferlist &bl) i++) { dout(2) << " osd" << i->first << " DOWN clean=" << (int)i->second << dendl; } - for (map::iterator i = pending_inc.new_up.begin(); - i != pending_inc.new_up.end(); + for (map::iterator i = pending_inc.new_up_client.begin(); + i != pending_inc.new_up_client.end(); i++) { - dout(2) << " osd" << i->first << " UP " << i->second << dendl; + dout(2) << " osd" << i->first << " UP " << i->second << dendl; //FIXME: insert cluster addresses too } for (map::iterator i = pending_inc.new_weight.begin(); i != pending_inc.new_weight.end(); @@ -472,14 +472,14 @@ bool OSDMonitor::prepare_boot(MOSDBoot *m) pending_inc.new_down[from] = false; paxos->wait_for_commit(new C_RetryMessage(this, m)); - } else if (pending_inc.new_up.count(from)) { + } else if (pending_inc.new_up_client.count(from)) { //FIXME: should this be using new_up_client? // already prepared, just wait dout(7) << "prepare_boot already prepared, waiting on " << m->get_orig_source_addr() << dendl; paxos->wait_for_commit(new C_Booted(this, m, false)); } else { // mark new guy up. down_pending_out.erase(from); // if any - pending_inc.new_up[from] = m->get_orig_source_addr(); + pending_inc.new_up_client[from] = m->get_orig_source_addr(); //FIXME: should this be using new_up_client? pending_inc.new_hb_up[from] = m->hb_addr; // mark in? diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index cabdf28f6a1..14f6093ef01 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2313,8 +2313,8 @@ void OSD::handle_osd_map(MOSDMap *m) if (osd == whoami) continue; note_down_osd(i->first); } - for (map::iterator i = inc.new_up.begin(); - i != inc.new_up.end(); + for (map::iterator i = inc.new_up_client.begin(); + i != inc.new_up_client.end(); i++) { if (i->first == whoami) continue; note_up_osd(i->first); diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index 8483151d979..13a32029ed8 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -153,7 +153,8 @@ public: map new_pools; map new_pool_names; set old_pools; - map new_up; + map new_up_client; + map new_up_internal; map new_down; map new_weight; map > new_pg_temp; // [] to remove @@ -181,7 +182,7 @@ public: ::encode(new_pools, bl); ::encode(new_pool_names, bl); ::encode(old_pools, bl); - ::encode(new_up, bl); + ::encode(new_up_client, bl); ::encode(new_down, bl); ::encode(new_weight, bl); ::encode(new_pg_temp, bl); @@ -195,6 +196,7 @@ public: ::encode(new_lost, bl); ::encode(new_blacklist, bl); ::encode(old_blacklist, bl); + ::encode(new_up_internal, bl); } void decode(bufferlist::iterator &p) { // base @@ -214,7 +216,7 @@ public: if (v >= 5) ::decode(new_pool_names, p); ::decode(old_pools, p); - ::decode(new_up, p); + ::decode(new_up_client, p); ::decode(new_down, p); ::decode(new_weight, p); ::decode(new_pg_temp, p); @@ -231,6 +233,7 @@ public: ::decode(new_lost, p); ::decode(new_blacklist, p); ::decode(old_blacklist, p); + ::decode(new_up_internal, p); } Incremental(epoch_t e=0) : @@ -539,8 +542,8 @@ private: osd_info[i->first].down_at = epoch; //cout << "epoch " << epoch << " down osd" << i->first << endl; } - for (map::iterator i = inc.new_up.begin(); - i != inc.new_up.end(); + for (map::iterator i = inc.new_up_client.begin(); + i != inc.new_up_client.end(); i++) { osd_state[i->first] |= CEPH_OSD_EXISTS | CEPH_OSD_UP; osd_addr[i->first] = i->second;