# Pacemaker & Corosync Setup Issues



## int_0xff (Nov 8, 2021)

I'm wondering if anyone has a working Pacemaker/Corosync setup running that has a clue where I can look for my issue below. I've googled however not much is returned.

I followed the guide here and everything goes good up to starting Pacemaker. corosync.conf is a copy/paste from the article with IPs substituted.

 It errors out with "info: Could not connect to Corosync CMAP: CS_ERR_TRY_AGAIN" and after failing a handful of retries, exits. When I run corosync-cmapctl to view the membership it returns "Failed to initialize the cmap API. Error CS_ERR_INVALID_PARAM" which I would say is related to the Pacemaker error. Google is returning either code or solutions for Linux. I ran the same setup on a Linux box and Corosync works as expected which leads me to think something is missing, either from my FreeBSD install or from my config.

I'm also open to alternatives to Pacemaker for cluster resource management. I'm trying to recreate an old Solaris Zone hosting environment from a couple jobs ago that utilized SRDF and Veritas Cluster Server; Albet an extremely cheap version. I've been messing with carp and devd trying make the migration process a little less manual but it would be nice to have an actual resource manager. I have each jail in it's own ZFS pool which is on top of HAST and works like a champ.

Running FreeBSD 13 in KVM on an amd64 Linux box.


----------



## richardtoohey2 (Nov 9, 2021)

I can't help with that particular software, but it might help to provide more information e.g. are you using FreeBSD 12 ? 13?  amd64 or something else?

Looks like a lot of instructions to follow in the guide!


----------



## int_0xff (Nov 9, 2021)

Good point Richard, I've updated the post.


----------



## grahamperrin@ (Nov 20, 2021)

vermaden FYI ▲


----------



## oOiOo (Nov 20, 2021)

int_0xff said:


> I have each jail in it's own ZFS pool which is on top of HAST and works like a champ.


I have some experience with Linux clusters using Pacemaker/corosync and DRBD (linux version of HAST - or HAST is the FreeBSD version of DRBD  ).

Pacemaker use "resources agents" to manage services, filesystems, network, etc. A resource agent is available for DRBD but I am not sure it exist for HAST.
Create your own resource agent is not an easy task. Be sure that it's compatible with HAST. If not, Pacemaker/corosync is not the way to go.


----------



## vermaden (Nov 20, 2021)

int_0xff said:


> I'm wondering if anyone has a working Pacemaker/Corosync setup running that has a clue where I can look for my issue below. I've googled however not much is returned.
> 
> I followed the guide here and everything goes good up to starting Pacemaker. corosync.conf is a copy/paste from the article with IPs substituted.
> 
> ...


I wrote that guide more then a year ago - maybe something has changed in the Pacemaker/Corosync stuff that is not problematic on the FreeBSD land ... I did not used that cluster on FreeBSD since then - so I am not able to help you ... and even if I install it now I would probably get the same errors as you got.

IMHO you should start to go other route - with either CARP or uCARP (which is nothing more then userspace CARP).

If you search the Internet you will get at least several solutions related to CARP/uCARP for the highly available IP address that you can stick with some reosurces. As for the 'shared storage' either use some external host NFS or HAST between two FreeBSD machines.

At least this is what I would probably do.


----------



## int_0xff (Nov 21, 2021)

I used (u)carp about a decade ago and have been using Pacemaker in Linux since then.

The problem with carp in this context is it's not just a floating IP address that needs to be managed. There is HAST, ZFS, and the Jail config and assiciated started/stopped status. There are many things you want to check and validate in this config in terms of where the jail should be running and not just where the IP currently lives. Keepalived can do this thru scripts, and carp is even more basic; This is something Pacemaker is specifically designed to do.

The whole point of running a jail on top of HAST with Pacemaker is to automatically failover between physical machines without human intervention. Using a NFS based solution only complicates the HA requirements further beyond a 2 node cluster.

If the end result is going to be scripting this out to run within carp, I might as well do the extra work of replacing carp (and by proxy Pacemaker) to have a standalone with fewer restrictions.


Thanks.


----------

