]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/monc: renew subscriptions when reopening a session. 39768/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 1 Mar 2021 14:09:22 +0000 (14:09 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 1 Mar 2021 21:29:43 +0000 (21:29 +0000)
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 <rzarzyns@redhat.com>
src/crimson/mon/MonClient.cc

index fd7c475c3f1007420858c0777fcdbc11f58f3007..52534e5d34cf013ea7a476462f687e32f85779d8 100644 (file)
@@ -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();
   });
 }