clock_tare: false,
// --- messenger ---
+ ms_hosts: ".ceph_hosts",
ms_tcp_nodelay: true,
ms_retry_interval: 2.0, // how often to attempt reconnect
ms_fail_interval: 15.0, // fail after this long
else if (strcmp(args[i], "--numosd") == 0)
g_conf.num_osd = atoi(args[++i]);
+ else if (strcmp(args[i], "--ms_hosts") == 0)
+ g_conf.ms_hosts = args[++i];
else if (strcmp(args[i], "--ms_stripe_osds") == 0)
g_conf.ms_stripe_osds = true;
else if (strcmp(args[i], "--ms_skip_rank0") == 0)
dout(2) << "accepter.start my hostname is " << hostname << dendl;
// is there a .ceph_hosts file?
- {
+ if (g_conf.ms_hosts) {
ifstream fh;
- fh.open(".ceph_hosts");
+ fh.open(g_conf.ms_hosts);
if (fh.is_open()) {
while (1) {
string line;
if (!ospace) continue;
string host = line.substr(0, ospace);
string addr = line.substr(ospace+1);
- dout(15) << ".ceph_hosts: host '" << host << "' -> '" << addr << "'" << dendl;
+ dout(15) << g_conf.ms_hosts << ": host '" << host << "' -> '" << addr << "'" << dendl;
if (host == hostname) {
parse_ip_port(addr.c_str(), g_my_addr);
- dout(1) << ".ceph_hosts: my addr is " << g_my_addr << dendl;
+ dout(1) << g_conf.ms_hosts << ": my addr is " << g_my_addr << dendl;
break;
}
}