Bug 149236 - cman_tool wait not waiting
cman_tool wait not waiting
Status: CLOSED CURRENTRELEASE
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: cman (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christine Caulfield
Cluster QE
:
Depends On:
Blocks: 147828
  Show dependency treegraph
 
Reported: 2005-02-21 10:59 EST by Adam "mantis" Manthei
Modified: 2009-04-24 10:33 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-24 10:33:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam "mantis" Manthei 2005-02-21 10:59:39 EST
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
Comment 1 Christine Caulfield 2005-02-21 12:11:14 EST
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

Note You need to log in before you can comment on or make changes to this bug.