Skip to content

Commit

Permalink
Merge pull request ceph#1461 from ceph/wip-7692
Browse files Browse the repository at this point in the history
mon: on timecheck on monmap 0

Reviewed-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
Sage Weil committed Mar 14, 2014
2 parents a3719e0 + f1bd59f commit a2f3b30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/ceph_mon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,10 @@ int main(int argc, const char **argv)
}

err = mon->preinit();
if (err < 0)
if (err < 0) {
derr << "failed to initialize" << dendl;
prefork.exit(1);
}

if (compact || g_conf->mon_compact_on_start) {
derr << "compacting monitor store ..." << dendl;
Expand Down
3 changes: 2 additions & 1 deletion src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,8 @@ void Monitor::win_election(epoch_t epoch, set<int>& active, uint64_t features,
health_monitor->start(epoch);

finish_election();
if (monmap->size() > 1)
if (monmap->size() > 1 &&
monmap->get_epoch() > 0)
timecheck_start();
}

Expand Down
2 changes: 1 addition & 1 deletion src/msg/Accepter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int Accepter::bind(const entity_addr_t &bind_addr, const set<int>& avoid_ports)
int on = 1;
rc = ::setsockopt(listen_sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
if (rc < 0) {
ldout(msgr->cct,0) << "accepter.bind unable to setsockopt: "
lderr(msgr->cct) << "accepter.bind unable to setsockopt: "
<< cpp_strerror(errno) << dendl;
return -errno;
}
Expand Down

0 comments on commit a2f3b30

Please sign in to comment.