OndrejHome/ansible.ha-cluster-pacemaker

run cluster in UNICAST

Closed this issue · 7 comments

did some playing around and on CentOS 6 if execute the following before enabling the cluster the following;

name: Configure cluster for Unicast
command: ccs -f /etc/cluster/cluster.conf --setcman broadcast="no" expected_votes="1" transport="udpu" two_node="1"
the cluster starts up in unicast mode vs multicast

Hi @frank3427,

Thank you for observation. I'm able to get the unicast cluster in CentoOS 6.9 when this is executed before starting the services. In CentOS 7.4 this would not work as the /etc/cluster/cluster.conf is not used there and also the unicast is a default transport in CentOS 7.4.

Currently I'm relying on defaults that are used in given systems - CentOS 6.X - multicast, CentOS 7.X - unicast.

Could you please let me know if the purpose of this issue is to propose 'the ability to choose the transport mode (unicast/multicast) using this role' or if there is some other motivation for this?

Yes, in our network we run into many issue with multicast.

Yes the ability to choose the transport mode (unicast/multicast) using this role'

I have found that in most cloud providers multicast does not work, AWS and GCE are two examples. that is why most are going toward unicast configurations

Thank you for feedback. I will check how this can be achieved to work in both CentOS/RHEL 6.X and in CentOS/RHEL 7.X where this configuration option is in different place and let you know.

It looks that transport mode can be specified to 'pcs' when creating cluster using '--transport' argument.

        --transport allows specification of corosync transport (default: udpu;
            udp for CMAN clusters),

For that the change in module 'pcs_cluster' will be needed in OndrejHome/ansible.pcs-modules-2. If that works as expected then this role can be then altered to use this option.

After adding ability to pcs_cluster to choose the cluster transport I have also added the option here so it can be used with OndrejHome.ha-cluster-pacemaker role. This will need the new OndrejHome.pcs-modules-2 that has ablity to setup the transport via pcs_cluster module. Once that is merged into 'master' I will close this issue. In the meantime feel free to try out the version from 'develop' branch (use the OndrejHome.pcs-modules-2 from 'develop' branch too).

I have merged the changes into 'master', the changes are now available from version 'v15' of 'OndrejHome.ha-cluster-pacemaker' role. 'OndrejHome.pcs-modules-2' version 'v12' is needed to support the cluster transport option.

Thank you for suggestion on this feature!