Red Hat Bugzilla – Bug 1163671
[RFE] Default corosync configuration should log to file
Last modified: 2018-08-14 03:13:33 EDT
Description of problem: Currently, pcs generated config file doesn't contain logging to log file and only logging to syslog is configured. This is suboptimal, because both journald and syslogd has tendency to throw out messages what makes /var/log/messages unusable. Also there is no possibility to turn on debugging (debug or trace) using pcs. Version-Release number of selected component (if applicable): 0.9.135 How reproducible: 100% Steps to Reproduce: 1. generate corosync.conf using pcs Actual results: corosync.conf: ... logging { to_syslog: yes } ... Expected results: ... logging { to_logfile: yes logfile: /var/log/cluster/corosync.log to_syslog: yes } ... Additional info:
Created attachment 1041644 [details] proposed fix
Before Fix: [root@rh71-node1 ~]# rpm -q pcs pcs-0.9.140-1.el7.x86_64 [root@rh71-node1:~]# pcs cluster setup --name test rh71-node1 rh71-node2 Shutting down pacemaker/corosync services... Redirecting to /bin/systemctl stop pacemaker.service Redirecting to /bin/systemctl stop corosync.service Killing any remaining services... Removing all cluster configuration files... rh71-node1: Succeeded rh71-node2: Succeeded Synchronizing pcsd certificates on nodes rh71-node1, rh71-node2. pcsd needs to be restarted on the nodes in order to reload the certificates. [root@rh71-node1:~]# grep -A5 logging /etc/corosync/corosync.conf logging { to_syslog: yes } After Fix: [root@rh71-node1:~]# rpm -q pcs pcs-0.9.141-1.el7.x86_64 [root@rh71-node1:~]# pcs cluster setup --name test rh71-node1 rh71-node2 Shutting down pacemaker/corosync services... Stopping pacemaker (via systemctl): [ OK ] Redirecting to /bin/systemctl stop corosync.service Killing any remaining services... Removing all cluster configuration files... rh71-node1: Succeeded rh71-node2: Succeeded Synchronizing pcsd certificates on nodes rh71-node1, rh71-node2. pcsd needs to be restarted on the nodes in order to reload the certificates. [root@rh71-node1:~]# grep -A5 logging /etc/corosync/corosync.conf logging { to_logfile: yes logfile: /var/log/cluster/corosync.log to_syslog: yes }
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-2290.html