return seastar::now();
}
logger().info("connecting to mon.{}", rank);
- return seastar::futurize_invoke(
- [peer, this] () -> seastar::future<Connection::auth_result_t> {
- auto conn = msgr.connect(peer, CEPH_ENTITY_TYPE_MON);
- auto& mc = pending_conns.emplace_back(
- std::make_unique<Connection>(auth_registry, conn, &keyring));
- assert(conn->get_peer_addr().is_msgr2());
- return mc->authenticate_v2();
- }).then([peer, this](auto result) {
+ auto conn = msgr.connect(peer, CEPH_ENTITY_TYPE_MON);
+ auto& mc = pending_conns.emplace_back(
+ std::make_unique<Connection>(auth_registry, conn, &keyring));
+ assert(conn->get_peer_addr().is_msgr2());
+ return mc->authenticate_v2().then([peer, this](auto result) {
if (result == Connection::auth_result_t::success) {
_finish_auth(peer);
}
// @param rank, rank of the monitor to be connected, if it is less than 0,
// try to connect to all monitors in monmap, until one of them
// is connected.
- // @return true if a connection is established to a monitor
+ // @return true if a connection to monitor is established
seastar::future<bool> reopen_session(int rank);
std::vector<unsigned> get_random_mons(unsigned n) const;
seastar::future<> _add_conn(unsigned rank, uint64_t global_id);