]> git.ipfire.org Git - thirdparty/samba.git/commit
ctdb_mutex_ceph_rados_helper: fix deadlock via lock renewals
authorDavid Disseldorp <ddiss@samba.org>
Thu, 19 Jul 2018 09:55:23 +0000 (11:55 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 21 Aug 2018 09:47:26 +0000 (11:47 +0200)
commit0056094519166614c7c6d6f0851ea183d54f8721
tree06a8e183dda751d2a80fa0c2fb0c6bcf79399fba
parent3ec4c73a53ec8a9d7d73aad3c88b86e73cbb07fc
ctdb_mutex_ceph_rados_helper: fix deadlock via lock renewals

RADOS locks without expiry persist indefinitely. This results in CTDB
deadlock during failover if the recovery master dies unexpectedly, as
subsequently elected recovery master nodes can't obtain the recovery
lock.
Avoid deadlock by using a lock expiration time (10s by default), and
renewing it periodically.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13540

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit ce289e89e5c469cf2c5626dc7f2666b945dba3bd)
ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c