From: Radoslaw Zarzynski Date: Mon, 1 Mar 2021 14:09:22 +0000 (+0000) Subject: crimson/monc: renew subscriptions when reopening a session. X-Git-Tag: v17.1.0~2795^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2eaa5ac501870f75f80c3a57797a1d16594a6201;p=ceph.git crimson/monc: renew subscriptions when reopening a session. Lack of this feature was the root cause of an issue in teuthology testing in which a socket failure injection happened exactly during `mon_subscribe`; after the OSD reconnected, the message hasn't been resent and entire boot process has frozen. ``` DEBUG 2021-02-25 11:42:53,757 [shard 0] ms - [osd.2(client) v2:172.21.15.204:6804/33459@57376 >> mon.0 v2:172.21.15.204:3300/0] --> #6 === mon_subscribe({osdmap=1}) v3 (15) DEBUG 2021-02-25 11:42:53,757 [shard 0] ms - authenticated_encrypt_update plaintext.length()=80 buffer.length()=80 DEBUG 2021-02-25 11:42:53,757 [shard 0] ms - authenticated_encrypt_final buffer.length()=96 final_len=0 DEBUG 2021-02-25 11:42:53,757 [shard 0] ms - authenticated_encrypt_update plaintext.length()=48 buffer.length()=48 DEBUG 2021-02-25 11:42:53,757 [shard 0] ms - authenticated_encrypt_update plaintext.length()=16 buffer.length()=64 DEBUG 2021-02-25 11:42:53,757 [shard 0] ms - authenticated_encrypt_final buffer.length()=80 final_len=0 INFO 2021-02-25 11:42:53,758 [shard 0] ms - [osd.2(client) v2:172.21.15.204:6804/33459@57376 >> mon.0 v2:172.21.15.204:3300/0] execute_ready(): fault at READY on lossy channel, going to CLOSING -- std::system_error (error crimson::net:4, read eof) ``` Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/mon/MonClient.cc b/src/crimson/mon/MonClient.cc index fd7c475c3f1..52534e5d34c 100644 --- a/src/crimson/mon/MonClient.cc +++ b/src/crimson/mon/MonClient.cc @@ -1039,6 +1039,8 @@ seastar::future<> Client::reopen_session(int rank) return seastar::now(); } return active_con->renew_rotating_keyring(); + }).then([this] { + return sub.reload() ? renew_subs() : seastar::now(); }); }