if (g_conf.clock_tare) g_clock.tare();
MonMap *monmap = new MonMap(g_conf.num_mon);
-
+ entity_addr_t a;
+ a.nonce = getpid();
+ for (int i=0; i<g_conf.num_mon; i++) {
+ a.port = i;
+ monmap->mon_inst[i] = entity_inst_t(MSG_ADDR_MON(i), a); // hack ; see FakeMessenger.cc
+ }
+
Monitor *mon[g_conf.num_mon];
for (int i=0; i<g_conf.num_mon; i++) {
mon[i] = new Monitor(i, new FakeMessenger(MSG_ADDR_MON(i)), monmap);
mds[i] = new MDS(i, new FakeMessenger(MSG_ADDR_MDS(i)), monmap);
}
- // init
- for (int i=0; i<g_conf.num_mon; i++) {
+ // init
+ for (int i=0; i<g_conf.num_mon; i++)
mon[i]->init();
- }
- for (int i=0; i<NUMMDS; i++) {
- mds[i]->init();
- }
-
- for (int i=0; i<NUMOSD; i++) {
+ for (int i=0; i<NUMMDS; i++)
+ mds[i]->init();
+ for (int i=0; i<NUMOSD; i++)
osd[i]->init();
- }
// create client
MonMap *monmap = new MonMap(g_conf.num_mon);
entity_addr_t a;
+ a.nonce = getpid();
for (int i=0; i<g_conf.num_mon; i++) {
a.port = i;
monmap->mon_inst[i] = entity_inst_t(MSG_ADDR_MON(i), a); // hack ; see FakeMessenger.cc
OSD *mdsosd[g_conf.num_mds];
for (int i=0; i<g_conf.num_mds; i++) {
//cerr << "mds" << i << " on rank " << myrank << " " << hostname << "." << pid << endl;
- mds[i] = new MDS(-1, new FakeMessenger(MSG_ADDR_MDS_NEW), monmap);
+ mds[i] = new MDS(-1, new FakeMessenger(MSG_ADDR_MDS(i)), monmap);
if (g_conf.mds_local_osd)
mdsosd[i] = new OSD(i+10000, new FakeMessenger(MSG_ADDR_OSD(i+10000)), monmap);
start++;
_myinst.name = me;
_myinst.addr.port = nranks++;
//if (!me.is_mon())
- //_myinst.addr.nonce = getpid();
+ _myinst.addr.nonce = getpid();
// add to directory
directory[ _myinst.addr ] = this;
m->set_source(get_myname(), fromport);
m->set_source_addr(get_myaddr());
- m->set_dest(inst.name, port);
+ m->set_dest_inst(inst);
+ m->set_dest_port(port);
lock.Lock();
directory[inst.addr]->queue_incoming(m);
} else {
dout(0) << "--> " << get_myname() << " -> " << inst.name << " " << *m << " -- " << m
- << " *** destination DNE ***"
+ << " *** destination " << inst.addr << " DNE ***"
<< endl;
for (map<entity_addr_t, FakeMessenger*>::iterator p = directory.begin();
p != directory.end();