if mons_to_freeze:
for mon in mons_to_freeze:
- self.log('freezing mon.{m}'.format(m=mon))
self.freeze_mon(mon)
self.log('waiting for {delay} secs to unfreeze mons'.format(
delay=self.freeze_mon_duration))
time.sleep(self.freeze_mon_duration)
for mon in mons_to_freeze:
- self.log('unfreezing mon.{m}'.format(m=mon))
self.unfreeze_mon(mon)
if self.maintain_quorum:
self.switch_task()
for mon in mons_to_kill:
- self.log('reviving mon.{m}'.format(m=mon))
self.revive_mon(mon)
# do more freezes
if mons_to_freeze:
for mon in mons_to_freeze:
- self.log('freezing mon.{m}'.format(m=mon))
self.freeze_mon(mon)
self.log('waiting for {delay} secs to unfreeze mons'.format(
delay=self.freeze_mon_duration))
time.sleep(self.freeze_mon_duration)
for mon in mons_to_freeze:
- self.log('unfreezing mon.{m}'.format(m=mon))
self.unfreeze_mon(mon)
self.manager.wait_for_mon_quorum_size(len(mons))
}
CtPtr ProtocolV2::finish_client_auth() {
- ldout(cct, 20) << __func__ << dendl;
if (HAVE_MSGR2_FEATURE(peer_supported_features, COMPRESSION)) {
return send_compression_request();
}
}
CtPtr ProtocolV2::finish_server_auth() {
- ldout(cct, 20) << __func__ << dendl;
// server had sent AuthDone and client responded with correct pre-auth
// signature.
// We can start conditioanl msgr protocol
CtPtr ProtocolV2::start_session_connect() {
if (!server_cookie) {
- ldout(cct, 20) << __func__ << " starting a new session" << dendl;
ceph_assert(connect_seq == 0);
state = SESSION_CONNECTING;
return send_client_ident();
} else { // reconnecting to previous session
- ldout(cct, 20) << __func__ << " reconnecting to session" << dendl;
state = SESSION_RECONNECTING;
ceph_assert(connect_seq > 0);
return send_reconnect();
return WRITE(wait, "wait", read_frame);
}
- if (exproto->server_cookie && exproto->client_cookie &&
- exproto->client_cookie != client_cookie) {
- // Found previous session
- // peer has reseted and we're going to reuse the existing connection
- // by replacing the communication socket
- ldout(cct, 1) << __func__ << " found previous session existing=" << existing
- << ", peer must have reseted." << dendl;
- if (connection->policy.resetcheck) {
- exproto->reset_session();
- }
- return reuse_connection(existing, exproto);
- }
-
if (exproto->peer_global_seq > peer_global_seq) {
ldout(cct, 1) << __func__ << " this is a stale connection, peer_global_seq="
<< peer_global_seq
return send_server_ident();
}
+ if (exproto->server_cookie && exproto->client_cookie &&
+ exproto->client_cookie != client_cookie) {
+ // Found previous session
+ // peer has reseted and we're going to reuse the existing connection
+ // by replacing the communication socket
+ ldout(cct, 1) << __func__ << " found previous session existing=" << existing
+ << ", peer must have reseted." << dendl;
+ if (connection->policy.resetcheck) {
+ exproto->reset_session();
+ }
+ return reuse_connection(existing, exproto);
+ }
+
if (exproto->client_cookie == client_cookie) {
// session establishment interrupted between client_ident and server_ident,
// continuing...