corosync/corosync — pull request #32 by hopkings2008 (2014-07-24 03:17:09+00:00)
Title: fix problem of corosync crashes if network is down.

corosync will crash if network is down. Below are the reproduce steps:
1. setup cluster nodes.
2. start corosync and check that it contains the nodes we have configured in step 1.
3. run command 'ifdown eth0'.
4. check corosync daemon status, it is crashed.

Reason for the crash:
1. if network is down, there will be a '127.0.0.1' remaining and corosync will use this local ip and the local bind net instead of the bind net configured in /etc/corosync/corosync.conf.
2. in function 'message_handler_req_exec_votequorum_nodeinfo', corosync quorum cannot find the newly nodeid got from local ip in above 1. and 'assert(sender_node != NULL);' will fail, and the corosync process will receive a SIGABRT and it terminates.

Fix:
We should always use the bind net configured in /etc/corosync/corosync.conf instead of the local ip/net (127.0.0.1) in case of network is down, and in this case, we will use the timer to check the network again and again to see whether network will be available. If network is back, corosync can recover and resume working again.