Quantcast
Channel: CentOS 7: PCS Pacemaker Corosync Active/Active HAProxy dependency - Server Fault
Viewing all articles
Browse latest Browse all 3

CentOS 7: PCS Pacemaker Corosync Active/Active HAProxy dependency

$
0
0

I am trying to setup PCS for HAProxy on CentOS7 in an active/active configuration. I've done active/active before, but I am not familiar with constraints and dependency groups.

So far so good:

 2 nodes configured
 4 resources configured

 Online: [ HOST1 HOST2 ]

 Full list of resources:

  Clone Set: VIPHA-clone [VIPHA] (unique)
      VIPHA:0     (ocf::heartbeat:IPaddr2):       Started HOST2
      VIPHA:1     (ocf::heartbeat:IPaddr2):       Started HOST1
  Clone Set: haproxy-clone [haproxy]
      Started: [ HOST2 HOST1 ]

However, now I'd like to add a constraint that HAPRoxy must be running in order for the IP to be served by a host:

pcs constraint order haproxy-clone then VIPHA-clone

The problem with this is, HAProxy will never start because it cannot bind to the IP unless it is started first.

How would I set this up so that:

  1. pcs will take the IP offline on a host if a health check (i.e. haproxy process running) fails?

  2. pcs will only bring the IP up if a health check (i.e. haproxy process running) succeeds?

    • If this isn't possible as described above, start at same time and behave as #1

I appreciate any input. Thank you!


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images