]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd/migration/HttpClient: avoid reusing ssl_stream after shut down
authorIlya Dryomov <idryomov@gmail.com>
Fri, 6 Dec 2024 15:51:51 +0000 (16:51 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 16 Dec 2024 08:51:18 +0000 (09:51 +0100)
commitc7d197520c383314de6091c888a26e575ce972d5
tree762aab784c3e5105bf08fd6f4248ac235091a761
parentaac2046e88b55513ae90c90c3fec4eee1f1961e8
librbd/migration/HttpClient: avoid reusing ssl_stream after shut down

ssl_stream objects can't be reused after shut down: despite
a successful reconnect and handshake, any attempt to read or write
fails with "end of stream" (beast.http:1) or "protocol is shutdown"
(asio.ssl:337690831) error respectively.  This doesn't appear to be
documented, but Beast and ASIO authors both mention that the stream
must be destroyed and recreated [1][2].

This was missed because the only integration test with a big enough
image used http instead of https.

[1] https://github.com/boostorg/beast/issues/821#issuecomment-338354949
[2] https://github.com/chriskohlhoff/asio/issues/804#issuecomment-872746894

Fixes: https://tracker.ceph.com/issues/69178
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 20885b11794ba80d5cddd178994865a83da7240f)
qa/suites/rbd/migration/6-prepare/qcow2-https.yaml [new file with mode: 0644]
src/librbd/migration/HttpClient.cc