Description of problem: cman_tool wait and cman_tool -w join do not wait for the node to become a cluster memeber before returning. I don't know if the bug is in cman_tool or the kernel module. The code for cman_tool is as follows static void cluster_wait(commandline_t *comline) { . . . while (!ioctl(cluster_sock, ioctl_code, 0)) { if (recv(cluster_sock, recvbuf, sizeof(recvbuf), MSG_OOB) <= 0) die("Error waiting for cluster\n"); } . . . } the cman module has the following: static int do_ioctl_get_members(unsigned long arg) { . . . if (!we_are_a_cluster_member) return -ENOENT; . . . } From what I can tell, either cluster_wait() needs to be modified to test that that the SIOCCLUSTER_GETMEMBERS isoctl is non negative, or the ioctl needs to eliminate the check for we_are_a_cluster_member upon startup. Version-Release number of selected component (if applicable): [root@trin-04 ~]# rpm -qa | grep cman cman-1.0-0.pre23.1 cman-kernel-2.6.9-21.0 How reproducible: always Steps to Reproduce: 1. start with a a cluster were cman_tool join has not been called yet 2. start cman on a node: cman_tool join -w 3. cman_tool will have returned right away and /proc/cluster/status will indicate that the node is catually not yet part of the cluster Actual results: `cman_tool -w join` doesn't wait to be a cluster member Expected results: it should wait Additional info: The cman initscript needs the -w wait behavior fixed for bug #147828
bad idea to try to conflate the two events into one loop, it ended up breaking both of then. BTW I've also fixed cman_tool leave -w (spurious error message) too. Checking in main.c; /cvs/cluster/cluster/cman/cman_tool/main.c,v <-- main.c new revision: 1.17; previous revision: 1.16 done Checking in main.c; /cvs/cluster/cluster/cman/cman_tool/main.c,v <-- main.c new revision: 1.12.2.4; previous revision: 1.12.2.3 done