[ClusterLabs] logging in fence agents

Marek "marx" Grac mgrac at redhat.com
Wed Mar 18 11:45:02 EDT 2015


Hi,


On 03/11/2015 10:39 AM, Kostiantyn Ponomarenko wrote:
> Hi,
>
> Thank you for your reply.
> I realized that I wasn't clear in my question.
> I wrote a fence agent by myself.
> And I am in doubts what is the best way to make logging in that agent.
> I like the way OCF resource agents do they logging, but it doesn't 
> work for fence agents - environment variables are different.
> I am about to just write/append ( >> ) to Corosync's log file, because 
> I don't have any other ideas ... .
> Would be appreciated for any ideas.

Currently, fence agents logs to stderr and syslog.

If you write a new fence agent, take a look at our fencing library for 
python agents. It should be able to simplify your agent too. ideally, 
sent me your fence agent, so we can add it to upstream

m,




>
> Thank you,
> Kostya
>
> On Wed, Mar 11, 2015 at 11:18 AM, Marek "marx" Grac <mgrac at redhat.com 
> <mailto:mgrac at redhat.com>> wrote:
>
>
>     On 03/06/2015 03:12 PM, Kostiantyn Ponomarenko wrote:
>
>         Hi guys,
>
>         Is there a way to use Corosync's log file for fence agent?
>         I was going to use the same logging system as in resource
>         agents, but I found that fence agents have a different set of
>         environment variables.
>         So this string doesn't work:
>         :
>         ${OCF_FUNCTIONS=${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs}
>
>         Another question - is it possible to use OSF standart for
>         fence agents (I suppose it is not, but want to ensure).
>
>         What is the common practice for logging in fence agents (where
>         to write logs)?
>
>     Hi,
>
>     for fence agents, there is possibility to set logging directly.
>     Add "debug=file" and "verbose=1" (or on command line
>     --debug-file=FILE --verbose)
>
>     m,
>
>     _______________________________________________
>     Users mailing list: Users at clusterlabs.org
>     <mailto:Users at clusterlabs.org>
>     http://clusterlabs.org/mailman/listinfo/users
>
>     Project Home: http://www.clusterlabs.org
>     Getting started:
>     http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>     Bugs: http://bugs.clusterlabs.org
>
>
>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20150318/89f2e28e/attachment-0003.html>


More information about the Users mailing list