0

I'm trying to setup a PCS cluster on two nodes running Red-hat, and did successfully, I want to setup syslog server (rsyslog) in Active/Passive mode.

I created the cluster and added the resources, I care about the IPAddr2 resource.

I'm facing an issue which is: the virtual IP is showing it's active on one node when running the pcs status command, but when I send a syslog messages to this virtual IP, it's reflected on both nodes (node1,node2) which cause a duplicates in the logs. that's it, when I run tcpdump on both nodes, they both receive the traffic.

how to configure it to be active only on one node only (active/passive) not on both, and when that node fails the second node should start listening for the logs?

current cluster config:

[root@node1 heartbeat]# pcs status
Cluster name: Syslog
Stack: corosync
Current DC: node2 (version 1.1.20-5.el7-3c4c782f70) - partition with quorum
Last updated: Wed Dec 11 22:10:45 2019
Last change: Wed Dec 11 18:36:32 2019 by root via crm_resource on node1

2 nodes configured
1 resource configured

Online: [ node1 node2 ]

Full list of resources:

 Resource Group: Rsyslog
     rsyslog_vIP    (ocf::heartbeat:IPaddr2):   Started node1

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled

I used this command to add the virtual IP:

pcs resource create rsyslog_vIP IPaddr2 ip=10.10.1.32 cidr_netmask=24 op monitor interval=5s --group=Rsyslog

thanks for your support!

3
  • You described you issues, but if you want that someonel help you, you need to show cluster config.
    – c4f4t0r
    Dec 11, 2019 at 18:22
  • thank you, post updated to show the cluster config. Dec 11, 2019 at 19:12
  • You have only a virtual ip configured, that's right, but you need to check the rsyslog configuration of your nodes, because, the cluster uses rsyslog too and maybe is normal the logs are replicated, use logger command to test.
    – c4f4t0r
    Dec 11, 2019 at 20:03

1 Answer 1

0

The cluster nodes use rsyslog too to replicate the logs, if you want to have a clustered rsyslog, you need to have an specific of rsyslog binding on the virtual ip and use the rsyslog resource agent:

https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/rsyslog.in
2
  • hi, I've tried this script and placed it in the /usr/lib/ocf/resource.d/heartbeat and renamed it to rsyslogd and give it execute permission, and when I add the rsyslog service as a resource by this command : pcs resource create rsyslog ocf:heartbeat:rsyslogd configfile="/etc/rsyslog.conf" statusurl="" --group=Rsyslog , I get the following error : Error: Agent 'ocf:heartbeat:rsyslogd' is not installed or does not provide valid metadata: Metadata query for ocf:heartbeat:rsyslogd failed: Input/output error, use --force to override . is there a configuration required to fix it? thank you. Dec 12, 2019 at 0:38
  • OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/rsyslogd meta-data
    – c4f4t0r
    Dec 12, 2019 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .