Skip to content

Commit 627ecc7

Browse files
authored
Merge pull request ceph#64047 from kamoltat/wip-ksirivad-revert-pr-63413
ProtocolV2: Revert "make handle_existing_connection check for cookie mismatch first" Reviewed-by: Ronen Friedman <[email protected]>
2 parents db2a4a6 + f6378d5 commit 627ecc7

File tree

5 files changed

+14
-25
lines changed

5 files changed

+14
-25
lines changed

qa/config/rados.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ overrides:
1111
osd mclock profile: high_recovery_ops
1212
mon:
1313
mon scrub interval: 300
14-
debug mon: 30

qa/suites/rados/monthrash/ceph.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ overrides:
1313
mon osdmap full prune txsize: 2
1414
mon scrub inject crc mismatch: 0.01
1515
mon scrub inject missing keys: 0.05
16-
debug ms: 20
1716
# thrashing monitors may make mgr have trouble w/ its keepalive
1817
log-ignorelist:
1918
- ScrubResult

qa/tasks/mon_thrash.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,11 @@ def _do_thrash(self):
354354

355355
if mons_to_freeze:
356356
for mon in mons_to_freeze:
357-
self.log('freezing mon.{m}'.format(m=mon))
358357
self.freeze_mon(mon)
359358
self.log('waiting for {delay} secs to unfreeze mons'.format(
360359
delay=self.freeze_mon_duration))
361360
time.sleep(self.freeze_mon_duration)
362361
for mon in mons_to_freeze:
363-
self.log('unfreezing mon.{m}'.format(m=mon))
364362
self.unfreeze_mon(mon)
365363

366364
if self.maintain_quorum:
@@ -384,18 +382,15 @@ def _do_thrash(self):
384382
self.switch_task()
385383

386384
for mon in mons_to_kill:
387-
self.log('reviving mon.{m}'.format(m=mon))
388385
self.revive_mon(mon)
389386
# do more freezes
390387
if mons_to_freeze:
391388
for mon in mons_to_freeze:
392-
self.log('freezing mon.{m}'.format(m=mon))
393389
self.freeze_mon(mon)
394390
self.log('waiting for {delay} secs to unfreeze mons'.format(
395391
delay=self.freeze_mon_duration))
396392
time.sleep(self.freeze_mon_duration)
397393
for mon in mons_to_freeze:
398-
self.log('unfreezing mon.{m}'.format(m=mon))
399394
self.unfreeze_mon(mon)
400395

401396
self.manager.wait_for_mon_quorum_size(len(mons))

src/msg/async/ProtocolV2.cc

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,7 +1894,6 @@ CtPtr ProtocolV2::handle_auth_done(ceph::bufferlist &payload)
18941894
}
18951895

18961896
CtPtr ProtocolV2::finish_client_auth() {
1897-
ldout(cct, 20) << __func__ << dendl;
18981897
if (HAVE_MSGR2_FEATURE(peer_supported_features, COMPRESSION)) {
18991898
return send_compression_request();
19001899
}
@@ -1903,7 +1902,6 @@ CtPtr ProtocolV2::finish_client_auth() {
19031902
}
19041903

19051904
CtPtr ProtocolV2::finish_server_auth() {
1906-
ldout(cct, 20) << __func__ << dendl;
19071905
// server had sent AuthDone and client responded with correct pre-auth
19081906
// signature.
19091907
// We can start conditioanl msgr protocol
@@ -1920,12 +1918,10 @@ CtPtr ProtocolV2::finish_server_auth() {
19201918

19211919
CtPtr ProtocolV2::start_session_connect() {
19221920
if (!server_cookie) {
1923-
ldout(cct, 20) << __func__ << " starting a new session" << dendl;
19241921
ceph_assert(connect_seq == 0);
19251922
state = SESSION_CONNECTING;
19261923
return send_client_ident();
19271924
} else { // reconnecting to previous session
1928-
ldout(cct, 20) << __func__ << " reconnecting to session" << dendl;
19291925
state = SESSION_RECONNECTING;
19301926
ceph_assert(connect_seq > 0);
19311927
return send_reconnect();
@@ -2675,19 +2671,6 @@ CtPtr ProtocolV2::handle_existing_connection(const AsyncConnectionRef& existing)
26752671
return WRITE(wait, "wait", read_frame);
26762672
}
26772673

2678-
if (exproto->server_cookie && exproto->client_cookie &&
2679-
exproto->client_cookie != client_cookie) {
2680-
// Found previous session
2681-
// peer has reseted and we're going to reuse the existing connection
2682-
// by replacing the communication socket
2683-
ldout(cct, 1) << __func__ << " found previous session existing=" << existing
2684-
<< ", peer must have reseted." << dendl;
2685-
if (connection->policy.resetcheck) {
2686-
exproto->reset_session();
2687-
}
2688-
return reuse_connection(existing, exproto);
2689-
}
2690-
26912674
if (exproto->peer_global_seq > peer_global_seq) {
26922675
ldout(cct, 1) << __func__ << " this is a stale connection, peer_global_seq="
26932676
<< peer_global_seq
@@ -2710,6 +2693,19 @@ CtPtr ProtocolV2::handle_existing_connection(const AsyncConnectionRef& existing)
27102693
return send_server_ident();
27112694
}
27122695

2696+
if (exproto->server_cookie && exproto->client_cookie &&
2697+
exproto->client_cookie != client_cookie) {
2698+
// Found previous session
2699+
// peer has reseted and we're going to reuse the existing connection
2700+
// by replacing the communication socket
2701+
ldout(cct, 1) << __func__ << " found previous session existing=" << existing
2702+
<< ", peer must have reseted." << dendl;
2703+
if (connection->policy.resetcheck) {
2704+
exproto->reset_session();
2705+
}
2706+
return reuse_connection(existing, exproto);
2707+
}
2708+
27132709
if (exproto->client_cookie == client_cookie) {
27142710
// session establishment interrupted between client_ident and server_ident,
27152711
// continuing...

src/vstart.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ else
16221622
debug echo "** going verbose **"
16231623
CMONDEBUG='
16241624
debug osd = 20
1625-
debug mon = 30
1625+
debug mon = 20
16261626
debug osd = 20
16271627
debug paxos = 20
16281628
debug auth = 20

0 commit comments

Comments
 (0)