Hi Ken and Jan, Thank you for your comment.
I understand that solusion is to set PCMK_logfile in the sysconfig file. As a permanent fix, if you use the default values inside Pacemaker, how about setting environment variables using set_daemon_option() there? For example, as PCMK_logficility does. https://github.com/ClusterLabs/pacemaker/blob/Pacemaker-2.0.2-rc2/lib/common/logging.c#L806 BTW, Pacemaker writes to /var/log/pacemaker/pacemaker.log via libqb. RA writes to this file with echo redirect. If writing occurs at the same time, is there a risk that the file may be corrupted or the written log may disappear? I have never actually had a problem, but I'm interested in how this might happen. Regards, Yusuke 2019年5月28日(火) 23:56 Jan Pokorný <jpoko...@redhat.com>: > On 28/05/19 09:29 -0500, Ken Gaillot wrote: > > On Mon, 2019-05-27 at 14:12 +0900, 飯田雄介 wrote: > >> By the way, when /var/log/pacemaker/pacemaker.log is explicitly set > >> in the PCMK_logfile, it is confirmed that the resource-agents log is > >> output to the file set in the PCMK_logfile. > > > > Interesting ... the resource-agents library must look for PCMK_logfile > > as well as HA_logfile. In that case, the easiest solution will be for > > us to set PCMK_logfile explicitly in the shipped sysconfig file. I can > > squeeze that into the soon-to-be-released 2.0.2 since it's not a code > > change. > > Solution remains the same, only meant to note that presence of either: > > PCMK_logfile > HA_logfile (likely on the way towards deprecation, preferably avoid) > > in the environment (from respective sysconfig/default/conf.d file for > pacemaker) will trigger export of HA_LOGFILE environment variable > propagated subsequently towards the agent processes, and everything > then works as expected. IOW. OCF and/or resource-agents are still > reasonably decoupled, thankfully. > > -- > Jan (Poki) > _______________________________________________ > Manage your subscription: > https://lists.clusterlabs.org/mailman/listinfo/users > > ClusterLabs home: https://www.clusterlabs.org/ -- ---------------- 株式会社 DNPメトロシステムズ 飯田 雄介(iida...@mail.dnp.co.jp) 〒141-8001 東京都品川区西五反田3-5-20 DNP五反田ビル 携帯. 070-3186-0919 ----------------
_______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/