2.4.4. Configuring Corosync
Choose a port number and multi-cast
address.
Be sure that the values you chose do not conflict with any existing clusters you might have. For advice on choosing a multi-cast address, see
http://www.29west.com/docs/THPM/multicast-address-assignment.html For this document, I have chosen port 4000 and used 226.94.1.1 as the multi-cast address.
The instructions below only apply for a machine with a single NIC. If you have a more complicated setup, you should edit the configuration manually.
Next we automatically determine the hosts address. By not using the full address, we make the configuration suitable to be copied to other nodes.
Display and verify the configuration options
ais_port=4000
ais_addr=192.168.122.0
Once you’re happy with the chosen values, update the Corosync configuration
Finally, tell Corosync to load the Pacemaker plugin.
service {
name: pacemaker
ver: 1
}
END
The final configuration should look something like the sample in Appendix B, Sample Corosync Configuration.
When run in version 1 mode, the plugin does not start the Pacemaker daemons. Instead it just sets up the quorum and messaging interfaces needed by the rest of the stack. Starting the dameons occurs when the Pacemaker init script is invoked. This resolves two long standing issues:
Forking inside a multi-threaded process like Corosync causes all sorts of pain. This has been problematic for Pacemaker as it needs a number of daemons to be spawned.
Corosync was never designed for staggered shutdown - something previously needed in order to prevent the cluster from leaving before Pacemaker could stop all active resources.