Product SiteDocumentation Site

2.5.3. Configuring Corosync

In the past, at this point in the tutorial an explanation of how to configure and propagate corosync’s /etc/corosync.conf file would be necessary. Using pcs with the pcs daemon greatly simplifies this process by generating corosync.conf across all the nodes in the cluster with a single command. The only thing required to achieve this is to authenticate as the pcs user hacluster on one of the nodes in the cluster, and then issue the pcs cluster setup command with a list of all the node names in the cluster.
# pcs cluster auth pcmk-1 pcmk-2
Username: hacluster
Password:
pcmk-1: Authorized
pcmk-2: Authorized

# pcs cluster setup mycluster pcmk-1 pcmk-2
pcmk-1: Succeeded
pcmk-2: Succeeded
That’s it. Corosync is configured across the cluster. If you received an authorization error for either of those commands, make sure you setup the hacluster user account and password on every node in the cluster with the same password.
The final /etc/corosync.conf configuration on each node should look something like the sample in Appendix B, Sample Corosync Configuration.

Important

Pacemaker used to obtain membership and quorum from a custom Corosync plugin. This plugin also had the capability to start Pacemaker automatically when Corosync was started.
Neither behavior is possible with Corosync 2.0 and beyond as support for plugins was removed. Instead, Pacemaker must be started as a separate service.
Also, since Pacemaker made use of the plugin for message routing, a node using the plugin (Corosync prior to 2.0) cannot talk to one that isn’t (Corosync 2.0+). Rolling upgrades between these versions are therefor not possible and an alternate strategy [7] must be used.