On Fri, Jan 4, 2013 at 8:30 PM, Michal Fiala <fi...@mfiala.net> wrote: > Hallo, > > thanks for information. We are using corosync-1.4.4 and > pacemaker-1.1.6.1.
Oh, thats the old lrmd. In which case your original assessment could well be correct. > Pacemaker is started as a modul by corosync. > > corosync loggin option: > > logging { > fileline: off > to_stderr: no > to_logfile: no > logfile: /var/log/corosync.log > to_syslog: yes > syslog_facility: local0 > debug: on > timestamp: on > logger_subsys { > subsys: AMF > debug: off > } > } > > and syslog is loging all levels of local0: > > local0.* -/var/log/corosync.log > > This this setting correct? > > Because with this setup, we do not have stderr from ocf linbit/drbd in > corosync.log. > > Thanks > > Michal > > On 01/02/2013 01:00 PM, Andrew Beekhof wrote: >> On Fri, Dec 21, 2012 at 11:16 PM, Michal Fiala <fi...@mfiala.net> wrote: >>> Hallo, >>> >>> we use corosyng logging via syslog (to_logfile: no; to_syslog: yes; >>> syslog_facility: local0; debug: on). Some OCF scripts do not use OCF API >>> to execute commands. I mean function ocf_run, which capture STDOUT and >>> STDERR. For example linbit/drbd uses its own function to execute >>> do_cmd(), which does not capture STDERR. So you can not see STDERR >>> output in corosync log file. >>> I have discuss this problem on drbd-user mailing list and they mean, >>> that capturing STDERR should be done by lrmd. >>> >>> Communication from drbd-user mailing list: >>> >>> Q: Is there a way how to capture stderr from >>> /usr/lib/ocf/resource.d/linbit/drbd? I can simply patch ocf script, or >>> better this could be a global, permanent fix from developers. >>> >>> A: We deliberately chose to do it this way. >>> Besides the drbd.ocf predates ocf_run(), I think, >>> and is supposed to also work on clusters not providing this. >>> >>> The cluster-glue lrmd used to capture both stdout and stderr, >>> and logged it accordingly. >>> >>> The pacemaker 1.1.8 rewritten-from-scratch lrmd >>> apparently does not (yet). >> >> Not true. It is both captured and logged. The severity depends on a >> number of factors. >> So you might need to enable debug to get stderr from actions that didn't >> "fail". >> >>> >>> If you "fix" our do_cmd() in the way you propose to, >>> you'll break the drbd ocf resource agent, >>> because we use it in nested ways: X=$(do_cmd something else), >>> and expect *exactly* the stdout of somthing else there. >>> >>> So don't do that. >>> >>> If anything, this needs to be fixed in the rewritten-from-scratch >>> pacemaker lrmd. >>> >>> details see: >>> http://lists.linbit.com/pipermail/drbd-user/2012-December/019416.html >>> >>> How can I solve capturing STDERR? >>> >>> Thanks >>> >>> Michal >>> >>> >>> _______________________________________________ >>> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org >>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker >>> >>> Project Home: http://www.clusterlabs.org >>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf >>> Bugs: http://bugs.clusterlabs.org >> >> _______________________________________________ >> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org >> http://oss.clusterlabs.org/mailman/listinfo/pacemaker >> >> Project Home: http://www.clusterlabs.org >> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf >> Bugs: http://bugs.clusterlabs.org >> _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org