Skip to content

Commit

Permalink
Merge pull request ceph#14102 from renhwztetecs/renhw-wip-moninit-cle…
Browse files Browse the repository at this point in the history
…anup

mon: clean up in ceph_mon.cc

Reviewed-by: Joao Eduardo Luis <[email protected]>
Reviewed-by: Jos Collin <[email protected]>
  • Loading branch information
jecluis authored Jun 28, 2017
2 parents bebce62 + 56b5218 commit 40f023c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/ceph_mon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ int main(int argc, const char **argv)
string name;
monmap.get_addr_name(a, name);
monmap.rename(name, g_conf->name.get_id());
cout << argv[0] << ": renaming mon." << name << " " << a
<< " to mon." << g_conf->name.get_id() << std::endl;
dout(0) << argv[0] << ": renaming mon." << name << " " << a
<< " to mon." << g_conf->name.get_id() << dendl;
}
} else {
// is a local address listed without a name? if so, name myself.
Expand All @@ -382,20 +382,20 @@ int main(int argc, const char **argv)
monmap.get_addr_name(local, name);

if (name.compare(0, 7, "noname-") == 0) {
cout << argv[0] << ": mon." << name << " " << local
<< " is local, renaming to mon." << g_conf->name.get_id() << std::endl;
dout(0) << argv[0] << ": mon." << name << " " << local
<< " is local, renaming to mon." << g_conf->name.get_id() << dendl;
monmap.rename(name, g_conf->name.get_id());
} else {
cout << argv[0] << ": mon." << name << " " << local
<< " is local, but not 'noname-' + something; not assuming it's me" << std::endl;
dout(0) << argv[0] << ": mon." << name << " " << local
<< " is local, but not 'noname-' + something; not assuming it's me" << dendl;
}
}
}
}

if (!g_conf->fsid.is_zero()) {
monmap.fsid = g_conf->fsid;
cout << argv[0] << ": set fsid to " << g_conf->fsid << std::endl;
dout(0) << argv[0] << ": set fsid to " << g_conf->fsid << dendl;
}

if (monmap.fsid.is_zero()) {
Expand Down Expand Up @@ -435,8 +435,8 @@ int main(int argc, const char **argv)
exit(1);
}
store.close();
cout << argv[0] << ": created monfs at " << g_conf->mon_data
<< " for " << g_conf->name << std::endl;
dout(0) << argv[0] << ": created monfs at " << g_conf->mon_data
<< " for " << g_conf->name << dendl;
return 0;
}

Expand Down Expand Up @@ -726,11 +726,11 @@ int main(int argc, const char **argv)
prefork.exit(1);
}

cout << "starting " << g_conf->name << " rank " << rank
dout(0) << "starting " << g_conf->name << " rank " << rank
<< " at " << ipaddr
<< " mon_data " << g_conf->mon_data
<< " fsid " << monmap.get_fsid()
<< std::endl;
<< dendl;

// start monitor
mon = new Monitor(g_ceph_context, g_conf->name.get_id(), store,
Expand Down

0 comments on commit 40f023c

Please sign in to comment.