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!