mirror of
https://github.com/ceph/ceph
synced 2025-01-03 17:42:36 +00:00
osdmap: make room in incremental for separate cluster/client OSD addrs.
This commit is contained in:
parent
930ef4e563
commit
bc9cb9311f
@ -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
|
||||
|
||||
|
@ -174,10 +174,10 @@ void OSDMonitor::encode_pending(bufferlist &bl)
|
||||
i++) {
|
||||
dout(2) << " osd" << i->first << " DOWN clean=" << (int)i->second << dendl;
|
||||
}
|
||||
for (map<int32_t,entity_addr_t>::iterator i = pending_inc.new_up.begin();
|
||||
i != pending_inc.new_up.end();
|
||||
for (map<int32_t,entity_addr_t>::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<int32_t,uint32_t>::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?
|
||||
|
@ -2313,8 +2313,8 @@ void OSD::handle_osd_map(MOSDMap *m)
|
||||
if (osd == whoami) continue;
|
||||
note_down_osd(i->first);
|
||||
}
|
||||
for (map<int32_t,entity_addr_t>::iterator i = inc.new_up.begin();
|
||||
i != inc.new_up.end();
|
||||
for (map<int32_t,entity_addr_t>::iterator i = inc.new_up_client.begin();
|
||||
i != inc.new_up_client.end();
|
||||
i++) {
|
||||
if (i->first == whoami) continue;
|
||||
note_up_osd(i->first);
|
||||
|
@ -153,7 +153,8 @@ public:
|
||||
map<int32_t,pg_pool_t> new_pools;
|
||||
map<int32_t,string> new_pool_names;
|
||||
set<int32_t> old_pools;
|
||||
map<int32_t,entity_addr_t> new_up;
|
||||
map<int32_t,entity_addr_t> new_up_client;
|
||||
map<int32_t,entity_addr_t> new_up_internal;
|
||||
map<int32_t,uint8_t> new_down;
|
||||
map<int32_t,uint32_t> new_weight;
|
||||
map<pg_t,vector<int32_t> > 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<int32_t,entity_addr_t>::iterator i = inc.new_up.begin();
|
||||
i != inc.new_up.end();
|
||||
for (map<int32_t,entity_addr_t>::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;
|
||||
|
Loading…
Reference in New Issue
Block a user