summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2014-03-14 11:05:49 -0700
committerSage Weil <sage@inktank.com>2014-03-14 11:05:49 -0700
commita2f3b309f4e6318f1cfc1ea3e350200ee58c3bbb (patch)
treec3d045868d217f6be759176f0a050a6c3697cff6
parenta3719e0a053293af2245c9413143223c5af481de (diff)
parentf1bd59f84bca85542ad82d8f0923bbad994d7048 (diff)
downloadceph-a2f3b309f4e6318f1cfc1ea3e350200ee58c3bbb.tar.gz
Merge pull request #1461 from ceph/wip-7692
mon: on timecheck on monmap 0 Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
-rw-r--r--src/ceph_mon.cc4
-rw-r--r--src/mon/Monitor.cc3
-rw-r--r--src/msg/Accepter.cc2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc
index 3e4682b81be..0aa6b20f9cc 100644
--- a/src/ceph_mon.cc
+++ b/src/ceph_mon.cc
@@ -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;
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index 5697d0e97a5..a2d11120625 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -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();
}
diff --git a/src/msg/Accepter.cc b/src/msg/Accepter.cc
index 5eebb2eec61..f8ae7116cb1 100644
--- a/src/msg/Accepter.cc
+++ b/src/msg/Accepter.cc
@@ -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;
}