Bug 6571 - [CTDB] Adding Gentoo Distribution Support
Summary: [CTDB] Adding Gentoo Distribution Support
Status: RESOLVED FIXED
Alias: None
Product: CTDB 2.5.x or older
Classification: Unclassified
Component: ctdb (show other bugs)
Version: unspecified
Hardware: All Linux
: P3 enhancement
Target Milestone: ---
Assignee: Michael Adam
QA Contact: Michael Adam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-22 10:39 UTC by John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found)
Modified: 2016-09-07 00:14 UTC (History)
4 users (show)

See Also:


Attachments
Patch file to ./config/functions (/etc/ctdb/functions) (1.65 KB, patch)
2009-07-22 10:40 UTC, John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found)
no flags Details
Init SysV Script for CTDB on Gentoo (3.02 KB, application/octet-stream)
2009-07-22 10:52 UTC, John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found)
no flags Details
Patch file to ./config/events.d/50.samba (/etc/ctdb/events.d/50.samba) (534 bytes, patch)
2009-07-28 12:51 UTC, John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found)
no flags Details
Patch file to ./config/events.d/41.httpd (/etc/ctdb/events.d/41.httpd) (368 bytes, patch)
2009-07-28 12:51 UTC, John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found)
no flags Details
Patch file to ./config/functions (/etc/ctdb/functions) (1.68 KB, patch)
2009-07-29 13:45 UTC, John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found)
no flags Details
Patch file to ./config/functions (/etc/ctdb/functions) (1.67 KB, application/octet-stream)
2009-08-03 05:40 UTC, John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-22 10:39:56 UTC
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.
Comment 1 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-22 10:40:54 UTC
Created attachment 4457 [details]
Patch file to ./config/functions (/etc/ctdb/functions)
Comment 2 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-22 10:49:58 UTC
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.
Comment 3 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-22 10:52:30 UTC
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.
Comment 4 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-22 11:05:19 UTC
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.
> 

Comment 5 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-22 11:10:58 UTC
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
Comment 6 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-22 11:27:54 UTC
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.
Comment 7 Michael Adam 2009-07-22 16:05:19 UTC
Hi,

good to know that ctdb has hit gentoo, too :)
Going to look into this in the next time
Comment 8 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-28 12:51:16 UTC
Created attachment 4478 [details]
Patch file to ./config/events.d/50.samba (/etc/ctdb/events.d/50.samba)
Comment 9 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-28 12:51:56 UTC
Created attachment 4479 [details]
Patch file to ./config/events.d/41.httpd (/etc/ctdb/events.d/41.httpd)
Comment 10 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-28 12:55:47 UTC
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.
> 

Comment 11 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-07-29 13:45:38 UTC
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.
Comment 12 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2009-08-03 05:40:05 UTC
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.
Comment 13 Michael Adam 2009-09-15 06:30:42 UTC
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
Comment 14 John Simmonds (overfuse) (550 5.1.1 RESOLVER.ADR.RecipNotFound; not found) 2010-07-19 09:10:57 UTC
How can I take this forward?
Comment 15 Martin Schwenke 2016-09-07 00:14:21 UTC
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.