Dedicate heartbeat channell for /corosync

sengo

Member
Feb 19, 2009
27
0
21
Hi, according to the Red Hat documentation it's recommended to run cman on a private, isolated network.

For example using something like this in /etc/hosts:

192.168.100.1 node1.domain.local node1
192.168.100.2 node2.domain.local node2
172.16.100.1 node1-cman.domain.local node1-cman
172.16.100.2 node2-cman.domain.local node2-cman

Where the 172.16.100 network is an isolated, non-routed vlan.
Then configure the cluster using the "private" hostnames.

Is there a way to accomplish a similar setup in pve?
 
what is the correct way to implement it?

pvecm create pvecluster on node1
pvevm add pve01-cman on node2

produces this cluster.conf:

<?xml version="1.0"?>
<cluster name="pvecluster2" config_version="2">


<cman keyfile="/var/lib/pve-cluster/corosync.authkey">
</cman>


<clusternodes>
<clusternode name="pve01" votes="1" nodeid="1"/>
<clusternode name="pve02" votes="1" nodeid="2"/></clusternodes>


</cluster>

which obviously will not use the private network.

This is my hosts file:

192.168.3.201 pve01.apra.it pve01 pvelocalhost
192.168.3.202 pve02.apra.it pve02
172.16.16.201 pve01-cman.apra.it pve01-cman
172.16.16.202 pve02-cman.apra.it pve02-cman


192.168.3 is the public network
172.16.16 is private network

I want cman to use the private network.

Should I manually modify cluster.conf using pve01-cman and pve02-cman as clusternodes? Or should I just use the private ip addresses as pve01 and pve02 in /etc/hosts?
 
Ok, manually modifying pve/cluster.conf using "hostname-cman" causes the webui to break: I can only see the current node (and is marked as red) even if the cluster is quorate and functional.

The only other option seems to associate the private ip address with the hostname in /etc/hosts:

# 192.168.3.201 pve01.apra.it pve01 pvelocalhost
# 192.168.3.202 pve02.apra.it pve02
172.16.16.201 pve01.apra.it pve01 pvelocalhost
172.16.16.202 pve02.apra.it pve02

I'll give it a try