Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 397355 - net-fs/samba cluster flags wrong config file /etc/ctdb/functions
Summary: net-fs/samba cluster flags wrong config file /etc/ctdb/functions
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-02 10:17 UTC by Matteo Contri
Modified: 2019-07-10 19:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
search ctdb config file also in /etc/conf.d (patch,300 bytes, patch)
2012-01-02 10:20 UTC, Matteo Contri
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo Contri 2012-01-02 10:17:05 UTC
i'm creating a clustered samba config, and i've found a bug into events system of ctdb.
When a ctdb event popup, the directory /etc/events.d is scanned and all scripts with execution flag will be lanched.
Almost all scripts rely on loadconfig function that valorize variables searched in the config file. In gentoo the config file is /etc/conf.d/ctdb and loadconfig doesn't search in this path, then all variables are blank and scripts give back errors.

Regards

Reproducible: Always
Comment 1 Matteo Contri 2012-01-02 10:20:15 UTC
Created attachment 297621 [details, diff]
search ctdb config file also in /etc/conf.d

i tried to create a patch to search config file also in gentoo way. it works for me.
Comment 2 MCassaniti 2012-01-16 23:57:57 UTC
Just saw this bug. I've been using the same patch for my own production system. The reason this is required if it isn't already clear is that all scripts under /etc/ctdb/events.d have variables that get pulled in when sourcing /etc/ctdb/functions. The /etc/ctdb/functions file needs to know where the variables are set. In Gentoo's case this is in /etc/conf.d/ctdb, but other distro's have different locations. Adding this patch searches the following locations in order (with $1 being set to ctdb):
 - /etc/sysconfig/$1
 - /etc/default/$1
 - $CTDB_BASE/sysconfig/$1
 - /etc/config.d/$1
 - /etc/conf.d/$1

This patch should probably be submitted upstream if it is committed within Gentoo.
Comment 3 Chan Min Wai 2014-02-05 04:47:18 UTC
I would suggest to use /etc/default

Until upstream agreed to add in /etc/conf.d/
Comment 4 Chan Min Wai 2014-10-13 12:23:22 UTC
I think we should drop this 

And move to the new location.

/etc/ctdb/ctdbd.conf

It should work better...
As all the configuration are under /etc/ctdb/*

Hope to fix that on "Bug 500332"
Comment 5 Ben Kohler gentoo-dev 2019-07-10 19:03:27 UTC
Please reopen if this still affects current samba versions