[PATCH] CTDB recovery lock with arbitrary cluster mutex

Martin Schwenke martin at meltin.net
Tue Apr 26 03:45:40 UTC 2016


[Resending from correct address...can moderators please drop the other one?]

The attached patch set changes the CTDB recovery lock so that it can be
implemented using an arbitrary, external cluster mutex helper.  At the
configuration level this looks like:

  CTDB_RECOVERY_LOCK="!/path/to/my/cluster/mutex/helper [arg ...]"

Without the leading '!' CTDB continues to use the setting as the name
of a recovery lock file, which is passes to the provided fcntl(2) lock
helper.

Helpers can be written according to a simple, documented API.

Still to do:

* Drop support for setting the recovery lock at run-time, since it is
  not possible to gracefully handle failure.

* Split the recovery lock into a cluster lock (held by election
  winner) and a recovery lock (held only during recovery).  Recovery
  lock may not be needed in the long term but this depends on some
  decisions about how election loss and in-progress recovery interact
  with each other.

Please review and maybe push...

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctdb.patch
Type: text/x-patch
Size: 88745 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160426/4959299b/ctdb-0001.bin>


More information about the samba-technical mailing list