]> git-server-git.apps.pok.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>
Fri, 13 Dec 2024 12:44:44 +0000 (13:44 +0100)
commit20885b11794ba80d5cddd178994865a83da7240f
tree07a713f0098a2c8262a0aff6ed627597ad6ff4b8
parent5699e4b871c66035c2c425bc9de7022fa2474c78
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>
qa/suites/rbd/migration/6-prepare/qcow2-https.yaml [new file with mode: 0644]
src/librbd/migration/HttpClient.cc