[Linux-cluster] ocf_log

C. Handel christoph at macht-blau.org
Tue Apr 13 10:02:50 UTC 2010


On Thu, Apr 1, 2010 at 6:00 PM,  <linux-cluster-request at redhat.com> wrote:

>>> i'm writing a custom resource agent. In the resource agent i try to
>>> use the ocf_log funtions but they don't work as expected. When i run
>>> the rgmanager in the foreground (clurgmgrd -df) i get all the message
>>> i want. When running as a normal daemon i can't find my log entries.


>> Have you defined a syslog.conf entry for your local4 facility ?


> yes. Messages from logger (which uses the same facility as rm) and
> debug messages from the ip resource agent show up.

To complete this question for the archives.

i missed sbin in my PATH environment variable.

Resource Agents (when called from clumgrd) have a default path without
sbin. At the beginning of my agent i also included sbin, but i didn't
export it. When calling ocf_log, the actual log is done by a call to
"clulog" which is in sbin. As the path of the included shellscript is
not changed, it is not found.

so the beginning of the resource agent is

LC_ALL=C
LANG=C
PATH=/bin:/sbin:/usr/bin:/usr/sbin
# remember to export path, so ocf_log function can find its clulog binary
export LC_ALL LANG PATH

. $(dirname $0)/ocf-shellfuncs




Greetings
   Christoph




More information about the Linux-cluster mailing list