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.
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.
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):
This patch should probably be submitted upstream if it is committed within Gentoo.
I would suggest to use /etc/default
Until upstream agreed to add in /etc/conf.d/
I think we should drop this
And move to the new location.
It should work better...
As all the configuration are under /etc/ctdb/*
Hope to fix that on "Bug 500332"
Please reopen if this still affects current samba versions