I have created a patch file to add better support to CTDB for the Gentoo distro. Its modifies the functions file in the tar ball source so that when it installs it has a /etc/ctdb/functions that works with Gentoo as well.
Created attachment 4457 [details] Patch file to ./config/functions (/etc/ctdb/functions)
One thing to note with this patch is that on Gentoo the ctdb config file, e.g. /etc/sysconfig/ctdb and others can be contained in /etc/conf.d. I.e. it will look for /etc/conf.d. This is a common location for service config files in Gentoo. I will shortly attach a Init SysV script for Gentoo which will also use this file.
Created attachment 4458 [details] Init SysV Script for CTDB on Gentoo Place this file in /etc/init.d/ and use it too start and stop ctdb on Gentoo. Also make sure you move the default ctdb config for CTDB and put that in /etc/conf.d/ in Gentoo.
i.e. move the ./config/ctdb.sysconfig to /etc/conf.d/ctdb file. (In reply to comment #3) > Created an attachment (id=4458) [details] > Init SysV Script for CTDB on Gentoo > > Place this file in /etc/init.d/ and use it too start and stop ctdb on Gentoo. > Also make sure you move the default ctdb config for CTDB and put that in > /etc/conf.d/ in Gentoo. >
I have created a new EBUILD (i.e. package) for Gentoo that will do all this automatically for you. I.e. it down loads the source for ctdb-1.0.86, then its applies the functions patch, then it installs the new Initd SysV script to and places the default config from ./config/ctdb.sysconfg to /etc/conf.d/ctdb. So if you use Gentoo just check this out: http://bugs.gentoo.org/show_bug.cgi?id=278695
The only things left to do is to make some changes to the scripts in events.d/ I hope to do that early next week and upload the patches.
Hi, good to know that ctdb has hit gentoo, too :) Going to look into this in the next time
Created attachment 4478 [details] Patch file to ./config/events.d/50.samba (/etc/ctdb/events.d/50.samba)
Created attachment 4479 [details] Patch file to ./config/events.d/41.httpd (/etc/ctdb/events.d/41.httpd)
I think I have now finished and attached patches for every script in events.d that needs to be changed to support Gentoo. (In reply to comment #6) > The only things left to do is to make some changes to the scripts in events.d/ > > I hope to do that early next week and upload the patches. >
Created attachment 4480 [details] Patch file to ./config/functions (/etc/ctdb/functions) Found a bug in original "4457: Patch file to ./config/functions (/etc/ctdb/functions)". This fixes it.
Created attachment 4499 [details] Patch file to ./config/functions (/etc/ctdb/functions) Spelling error in a path name caused a issue. Fixed and now tested fully.
Thanks for your continued updates! I will look into incorporating your patch real soon now. I will test for regressions on rhel and other system, but I have no gentoo available for testing right now, so I will rely on your statement there. Michael
How can I take this forward?
There is good evidence that CTDB is working fine in Gentoo these days. For example: https://github.com/gentoo/gentoo/commit/342d66f9a56b13bc363b96e48b795fd9fc618dc9 Someone can re-open or open a new bug if there are some changes required for Gentoo support in current versions.