Bug 476069 - /etc/init.d/clvmd doesnt wait for finish
/etc/init.d/clvmd doesnt wait for finish
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2-cluster (Show other bugs)
4.7
All Linux
low Severity medium
: rc
: ---
Assigned To: Milan Broz
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-11 14:35 EST by Edwin Eefting
Modified: 2013-02-28 23:07 EST (History)
12 users (show)

See Also:
Fixed In Version: lvm2-cluster-2.02.42-7.el4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-16 11:36:07 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)

  None (edit)
Description Edwin Eefting 2008-12-11 14:35:04 EST
/etc/init.d/clvmd doesnt wait for complete finish, which in turn will give a problem if the machine tries to leave the cluster.

Reproduce: Use a very fast clustered machine with LVM and GFS on a SAN, and reboot it or shut it down. cman wont be able to leave the cluster. i adjusted cman to produce extra debug output which shows this:

Dec 11 19:27:40 localhost cman: Stopping cman:
Dec 11 19:27:40 localhost cman: DEBUG, SERVICES BEFORE LEAVE:
Dec 11 19:27:40 localhost cman: Service          Name                              GID LID State     Code
Dec 11 19:27:40 localhost cman: DLM Lock Space:  "clvmd"                             3   3 run       S-15,200,2
Dec 11 19:27:40 localhost cman: [2 1]
Dec 11 19:27:40 localhost cman:
Dec 11 19:27:40 localhost cman: DEBUG LEAVE OUTPUT:
Dec 11 19:27:40 localhost cman: cman_tool: Can't leave cluster while there are 2 active subsystems
Dec 11 19:27:44 localhost rc: Stopping cman:  failed

The cman_tool services output shows clvmd is still running, while /etc/init.d/clvmd already has been stopped.

Furter investigation points out that /etc/init.d/clvmd doenst wait for a complete finish of clvmd, hence producing a race condition which result to a stop error with cman.

This simple patch to clvmd solves it:

--- clvmd.orig  2008-12-11 20:10:09.000000000 +0100
+++ clvmd       2008-12-11 19:36:43.000000000 +0100
@@ -114,6 +114,7 @@
        stop
        rtrn=$?
        [ $rtrn = 0 ] && rm -f $LOCK_FILE
+       wait_for_finish
        ;;

   restart)



Edwin Eefting (DatuX)
Fabian Schneider (NSI-BV)
Comment 1 Alasdair Kergon 2010-05-14 16:16:32 EDT
Sorry for the long delay in responding.  The problem is fixed upstream along with other problems in that script.  I'll add this script to the list for consideration for RHEL 4.9.
Comment 2 Edwin Eefting 2010-05-14 17:59:36 EDT
Its about time, thanks ;)
Comment 3 Milan Broz 2010-10-04 06:54:01 EDT
yes, this initscript problem should be fixed in next update (4.9).
Comment 4 Milan Broz 2010-10-21 13:05:22 EDT
Fixed in lvm2-cluster-2.02.42-7.el4.
Comment 6 Corey Marthaler 2011-01-13 19:23:20 EST
Fix verified in lvm2-cluster-2.02.42-9.el4.
Comment 7 errata-xmlrpc 2011-02-16 11:36:07 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0274.html

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