Re: ocf_log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 1, 2010 at 6:00 PM,  <linux-cluster-request@xxxxxxxxxx> 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

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux