}
if (peer_info.is_unhealthy(now)) {
- logger().error(" heartbeat_check: no reply from osd.{} "
- "since back {} front {} (oldest deadline {})",
- osd, peer_info.last_rx_back, peer_info.last_rx_front,
- peer_info.ping_history.begin()->second.deadline);
- failure_queue[osd] = std::min(peer_info.last_rx_back,
- peer_info.last_rx_front);
+ auto oldest_deadline = peer_info.ping_history.begin()->second.deadline;
+ auto failed_since = std::min(peer_info.last_rx_back,
+ peer_info.last_rx_front);
+ if (clock::is_zero(failed_since)) {
+ logger().error("heartbeat_check: no reply from osd.{} "
+ "ever on either front or back, first ping sent {} "
+ "(oldest deadline {})",
+ osd, peer_info.first_tx, oldest_deadline);
+ failed_since = peer_info.first_tx;
+ } else {
+ logger().error("heartbeat_check: no reply from osd.{} "
+ "since back {} front {} (oldest deadline {})",
+ osd, peer_info.last_rx_back, peer_info.last_rx_front,
+ oldest_deadline);
+ }
+ failure_queue.emplace(osd, failed_since);
}
}
if (!failure_queue.empty()) {
peers_map_t peers;
// osds which are considered failed
// osd_id => when was the last time that both front and back pings were acked
+ // or sent.
// use for calculating how long the OSD has been unresponsive
using failure_queue_t = std::map<osd_id_t, clock::time_point>;
seastar::future<> send_failures(failure_queue_t&& failure_queue);