Bug 149282 - cman modules still active after `cman_tool -w leave`
cman modules still active after `cman_tool -w leave`
Status: CLOSED NOTABUG
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: cman (Show other bugs)
4
All Linux
medium Severity low
: ---
: ---
Assigned To: Christine Caulfield
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-21 17:30 EST by Adam "mantis" Manthei
Modified: 2009-04-16 15:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-23 04:43:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test demonstrating the bug (834 bytes, text/plain)
2005-02-21 17:35 EST, Adam "mantis" Manthei
no flags Details

  None (edit)
Description Adam "mantis" Manthei 2005-02-21 17:30:27 EST
Description of problem:
You can not remove the cman kernel module immediately following a
"cman_tool -w leave" command.  This was causing problems in the init.d
script for cman until I added a sleep statement that followed the
cman_tool command to leave.  

It would be nice if `cman_tool -w leave` left the module in a state
that it could be removed, but if it can't, it's now bugged and
documented so that I know why I have that sleep statement in the
initscript later :)

Version-Release number of selected component (if applicable):
[root@trin-04 ~]# rpm -qa | grep cman
cman-kernheaders-2.6.9-18.0
cman-1.0-0.pre23.1
cman-kernel-2.6.9-21.0


How reproducible:
everytime

Steps to Reproduce:
1. start with a 6 node cluster with 6 nodes logged in with cman_tool join
2. on one node, run "cman_tool -w leave ; modprobe -r cman"
3. the cman module will fail to unload
  
Actual results:
the cman module will fail to unload

Expected results:
cman module should unload

Additional info:
This should not be considered a blocker.  A work around for this
problem is already in the initscripts.

                if cman_tool -w leave &>/dev/null
                then
                        # allow cman time to clean up
                        sleep 3
                fi
                modprobe -r cman && rtrn=0
Comment 1 Adam "mantis" Manthei 2005-02-21 17:35:43 EST
Created attachment 111280 [details]
test demonstrating the bug

#
# successful test run
#
[root@trin-04 ~]# ./cman_snooze.sh 1 1
+ '[' 2 -gt 2 ']'
+ nap=1
+ nap=1
+ iterations=1
+ iterations=1
+ service cman stop
Stopping cman:						   [  OK  ]
+ error=0
+ i=0
+ '[' 1 -eq 0 -o 0 -lt 1 ']'
+ error=1
++ date
+ echo 'Mon Feb 21 16:33:51 CST 2005: iteration 0'
Mon Feb 21 16:33:51 CST 2005: iteration 0
+ modprobe cman
+ cman_tool -w join
+ cman_tool -w leave
+ snooze
+ '[' 1 -gt 0 ']'
+ sleep 1
+ modprobe -r cman
+ error=0
+ i=1
+ '[' 1 -eq 0 -o 1 -lt 1 ']'
+ '[' 0 -eq 0 ']'
+ echo SUCCESS
SUCCESS
+ exit 0

#
# Failed test run
#
[root@trin-04 ~]# ./cman_snooze.sh 0 1
+ '[' 2 -gt 2 ']'
+ nap=0
+ nap=0
+ iterations=1
+ iterations=1
+ service cman stop
Stopping cman:						   [  OK  ]
+ error=0
+ i=0
+ '[' 1 -eq 0 -o 0 -lt 1 ']'
+ error=1
++ date
+ echo 'Mon Feb 21 16:34:00 CST 2005: iteration 0'
Mon Feb 21 16:34:00 CST 2005: iteration 0
+ modprobe cman
+ cman_tool -w join
+ cman_tool -w leave
+ snooze
+ '[' 0 -gt 0 ']'
+ modprobe -r cman
FATAL: Module cman is in use.
+ break
+ '[' 1 -eq 0 ']'
+ echo 'FAILED (iteration 0)'
FAILED (iteration 0)
+ exit 1
Comment 2 Christine Caulfield 2005-02-23 04:43:25 EST
I'm pretty sure this is ccsd.

When cman shuts down it sends EOF to all of its sockets, ccsd has one
of these open and there will be a delay between cman posting EOF and
ccsd actually closing the socket. the cman module cannot be unloaded
while programs have sockets open to it.

I can reproduce the problem with ccsd running. Without ccsd running I
can't.

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