]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
libcephsqlite: recover from blocklisting
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 27 Feb 2023 19:56:00 +0000 (14:56 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 27 Jun 2023 18:18:16 +0000 (14:18 -0400)
commitf7fb996ba475d601e693d54de1663e7b74de8333
tree1ba101a5927e1c4448b7666feae419e37d1c0b0f
parent8f073b1d285f8b5409f8b2251efe3db39972cddc
libcephsqlite: recover from blocklisting

Presently the libcephsqlite library becomes unusable (by design, at the
time) when the RADOS instance it uses is blocklisted. Unfortunately,
it's fairly common for this to happen during disruptive events. For the
ceph-mgr, it's unacceptable to require manual intervention via the
`ceph mgr fail` command.

So, this commit reworks libcephsqlite to reconnect to RADOS when its
cluster handle is blocklisted. This is safe as any open "file" by
sqlite3 has its own ptr to the open cluster handle. So those open files
will all continually fail until sqlite3 closes the handle (on database
connection shutdown). The application can then reopen the database if
desired using the fresh RADOS handle.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/libcephsqlite.cc