Bug 614421 - clusterfs ras does not umount because of wrong check in the code
clusterfs ras does not umount because of wrong check in the code
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: resource-agents (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Lon Hohberger
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-14 09:11 EDT by Fabio Massimo Di Nitto
Modified: 2010-11-10 17:16 EST (History)
4 users (show)

See Also:
Fixed In Version: resource-agents-3.0.12-13.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 17:16:08 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)
Fix (1.07 KB, patch)
2010-07-14 10:21 EDT, Lon Hohberger
no flags Details | Diff

  None (edit)
Description Fabio Massimo Di Nitto 2010-07-14 09:11:08 EDT
-       if [ -z "$force_umount" ]; then
+       if [ -z "$OCF_RESKEY_force_unmount" ]; then

the check is never true as-is and even with force_unmount=yes specified in the config, the comparison is always wrong.

So the result is that a clustefs is never umount when rgmanager exits or the service migrate.
Comment 1 Lon Hohberger 2010-07-14 09:56:08 EDT
This is because in the test, force_unmount="on".  utils/fs-lib.sh checks for "yes" and "1", but not "on".

So, either we need to change it in fs-lib.sh or fix in luci.
Comment 2 Lon Hohberger 2010-07-14 10:21:48 EDT
Created attachment 431787 [details]
Fix
Comment 3 Lon Hohberger 2010-07-14 10:27:07 EDT
[root@localhost resources]# fs-test/clusterfs-test.sh
Creating holder program...OK
Creating file system image /tmp/test-23154/fs-image (50MB)...OK
Creating gfs2 filesystem...OK
Basic tests:
- Status:OK
- Start:OK
- Status:OK
- Status (depth 10):OK
- Status (depth 20):OK
- Stopping (no force_unmount; should stay mounted):OK
- Stopping (force_unmount):OK
Basic Tests PASSED
Testing service-level reference count handling...OK
Clearing service-level reference count and unmounting...OK
Testing clearing a reference with force_unmount set...OK
Testing clearing a reference on subdirectory with force_unmount set...OK
Testing clearing a reference on subdirectory with force_unmount set to 'on'...OK
Testing clearing a reference on subdirectory with force_unmount set to 'true'...OK
Testing clearing a reference on subdirectory with force_unmount set to 'yes'...OK
Testing a known reference with a near-match: [/tmp/test-23154/mountfoo]...OK (holder was not killed)
Testing a known reference with a near-match: [/tmp/test-23154/mount foo]...OK (holder was not killed)
Testing a known reference with a near-match: [/tmp/test-23154/mount foo]...OK (holder was not killed)
Testing a known reference with a near-match: [/tmp/test-23154/mount /tmp/test-23154/mount]...OK (holder was not killed)
Testing a known reference with a near-match: [/tmp/test-23154/tmp/test-23154/mount]...OK (holder was not killed)
Testing clearing a process with SIGTERM blocked with force_unmount set...OK
Testing clearing a process living in the mountpoint...OK
Testing clearing a process living in the mountpoint with SIGTERM blocked...OK
Comment 7 Corey Marthaler 2010-08-27 16:47:05 EDT
<clusterfs device="/dev/grant/gfs1" force_unmount="1" fstype="gfs2" mountpoint="/mnt/gfs1" name="gfs1" options="" nfslock="1"/>

I was successfully able to relocate this fs resource with the force_unmount on and with both server and client references to it.

Aug 27 15:37:43 grant-01 qarshd[8134]: Running cmdline: clusvcadm -r HA_GFS -m grant-02
Aug 27 15:37:43 grant-01 rgmanager[2214]: Stopping service service:HA_GFS
Aug 27 15:37:43 grant-01 rgmanager[8168]: Removing IPv4 address 10.15.89.209/24 from eth0
Aug 27 15:37:53 grant-01 rgmanager[8213]: Removing export: *:/mnt/gfs1
Aug 27 15:37:54 grant-01 rgmanager[8270]: Dropping node-wide NFS locks
Aug 27 15:37:54 grant-01 rgmanager[8303]: Asking lockd to drop locks (pid 3054)
Aug 27 15:37:54 grant-01 rgmanager[8347]: Sending reclaim notifications via grant-01.lab.msp.redhat.com
Aug 27 15:37:54 grant-01 sm-notify[8369]: Version 1.2.2 starting
Aug 27 15:37:54 grant-01 sm-notify[8369]: Already notifying clients; Exiting!
Aug 27 15:37:58 grant-01 rgmanager[8425]: unmounting /mnt/gfs1
Aug 27 15:37:58 grant-01 rgmanager[8470]: Sending SIGTERM to processes on /mnt/gfs1
Aug 27 15:38:03 grant-01 rgmanager[8532]: unmounting /mnt/gfs1
Aug 27 15:38:04 grant-01 rgmanager[8577]: Sending SIGKILL to processes on /mnt/gfs1
Aug 27 15:38:09 grant-01 rgmanager[8640]: unmounting /mnt/gfs1
Aug 27 15:38:09 grant-01 rgmanager[2214]: Service service:HA_GFS is stopped

Marking verified with the latest latest build.
2.6.32-70.el6.x86_64
rgmanager-3.0.12-10.el6.x86_64
Comment 8 releng-rhel@redhat.com 2010-11-10 17:16:08 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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