2

i'm new to corosync and pacemaker and try to build cluster by using vm node1 & node2. here is the /etc/corosync/corosync.conf

# Please read the corosync.conf.5 manual page
compatibility: whitetank

totem {
    version: 2
    secauth: off
    interface {
        member {
            memberaddr: 192.168.1.101
        }
        member {
            memberaddr: 192.168.1.102
        }
        ringnumber: 0
        bindnetaddr: 192.168.1.100
        mcastport: 5405
        ttl: 1
    }
    transport: udpu
}

logging {
    fileline: off
    to_logfile: yes
    to_syslog: yes
    #logfile: /var/log/cluster/corosync.log
    debug: off
    timestamp: on
    logger_subsys {
        subsys: AMF
        debug: off
    }
}

the crm status:

[root@node1 ~]# crm status
Last updated: Wed Oct 29 04:41:37 2014
Last change: Wed Oct 29 01:29:10 2014 via crmd on node1
Stack: classic openais (with plugin)
Current DC: NONE
1 Nodes configured, 2 expected votes
0 Resources configured


Node node1: UNCLEAN (offline)

i follow this tutorial, http://www.tokiwinter.com/clustering-with-drbd-corosync-and-pacemaker/, but my status seems my setting is not successful

anyone can help?

-------------update----------------

corosync-1.4.1-17.e16_5.1.86_64
pacemaker-1.1.10-14.el6_5.3.x86_64

[root@node1 ~]# cat /etc/hosts
127.0.0.1    node1 localhost
::1        localhost6.localdomain6 localhost6
192.168.1.101    node1.mycluster.org node1
192.168.1.102   node2.mycluster.org node2
[root@node1 ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=node1
hkguile
  • 398
  • 2
  • 12
  • 22

2 Answers2

2

In my configuration I use bindnetaddr with the ip address for each host.

For example:

node1: bindnetaddr: 192.168.1.101

node2: bindnetaddr: 192.168.1.102

Edit:

bindnetaddr
his is normally the network address of the interface to bind to. This ensures that you can use identical instances of this configuration file across all your cluster nodes, without having to modify this option.

However, if you have multiple physical network interfaces configured for the same subnet, then the network address alone is not sufficient to identify the interface Corosync should bind to. In that case, configure the host address of the interface.

Federico Sierra
  • 3,589
  • 1
  • 20
  • 26
  • Man page of corosync.conf. conf says: "bindaddr: This specifies the network address the corosync executive should bind to. For example, if the local interface is 192.168.5.92 with netmask 255.255.255.0, set bindnetaddr to 192.168.5.0..." – alxgomz Nov 04 '14 at 22:40
  • Please read this thread: http://lists.corosync.org/pipermail/discuss/2012-May/001562.html. `bindnetaddr should be an IP address configured on the system, or a network address` – Federico Sierra Nov 04 '14 at 22:47
  • Good point. sorry for the down vote. (If you edit your answer I can fix it). However, it is not mentioned in which version it has been changed and 1.4 is pretty old now. – alxgomz Nov 04 '14 at 22:58
  • 1.4.1 seems to be from June 2013, so your link probably applies. – alxgomz Nov 04 '14 at 23:02
  • @alxgomz No problem, I added more information in my answer. – Federico Sierra Nov 04 '14 at 23:14
  • @alxgomz Take a look in this article http://moin.meidokon.net/CorosyncBindNetworkAddressSelection, this describes some problems in use the network address with a floating ip in the same network. – Federico Sierra Nov 04 '14 at 23:44
  • Interesting one. But as they say "maybe the answer is you shouldn't do that" (I mean doing rolling upgrades of clusters). Also whenever possible you should not mix service flows and clusters flows on the same network. – alxgomz Nov 05 '14 at 07:20
1

Try setting the bindnetaddr to 192.168.1.0 instead of .100. You can also remove TTL option as it is only valid for multicast and you're using udpu transport. You probably don't need the compatibility option. It's only relevant for openais version older than 0.81.

You can check the status of your rings with:

corosync-cfgtool -S

and the member who joined with:

corosync-objctl | grep member

alxgomz
  • 1,630
  • 1
  • 11
  • 14