[CTDB] Some patches

Martin Schwenke martin at meltin.net
Thu Jul 4 03:49:49 MDT 2013

Hi Sumit,

On Wed, 12 Jun 2013 13:14:41 +0200, Sumit Bose <sbose at redhat.com> wrote:

> On Wed, Jun 12, 2013 at 08:40:20PM +1000, Martin Schwenke wrote:
> > > > > On Fri, Jun 7, 2013 at 6:54 AM, Mathieu Parent <math.parent at gmail.com

> > > > > > There are also patches on the Fedora side:
> > > > > > http://pkgs.fedoraproject.org/cgit/ctdb.git/tree/, please take a look.

> > Most of the initscript patches look good, but need some work to get
> > them to apply against the master branch.

> Thank you for checking the patches. I would prefer if as many checks and
> tasks as possible can be moved to 00.ctdb::init. I think this will help
> to make supporting the two init systems much easier. Please ping me,
> when the changes are done so that I can redo the patches.

Amitay and I discussed this again today.  We think it would improve
maintainability if we moved most of the current initscript into a
separate script called, say, ctdbd_wrapper.  For starting ctdbd, the
wrapper would build the command-line options, wait until ctdbd is ready
and other miscellaneous things.  For stopping ctdbd, the wrapper would
do most of what the current initscript stop code does... but perhaps a
little tidier.  Then both the initscript and systemd could call
ctdbd_wrapper and it would do all of the "heavy lifting".  This seems
simpler than having an extra include file and several systemd scripts.

This would leave the initscript and systemd configuration nice and lean.

We could then support a configuration file such as /etc/ctdb/ctdb.conf,
expecting configuration to be done there instead
of /etc/sysconfig/ctdb. ctdb.conf could still be a shell script and
could have a meaningfully named manpage.  For the forseeable future,
ctdbd_wrapper would still load /etc/sysconfig/ctdb for backward
compatibility.  In the long term, only the initscript (and, I guess,
some systemd magic?) would use /etc/sysconfig/ctdb.

Does that sound like a good idea?  If so then I'll implement it

peace & happiness,

More information about the samba-technical mailing list