Bug 476069 - /etc/init.d/clvmd doesnt wait for finish
Summary: /etc/init.d/clvmd doesnt wait for finish
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2-cluster
Version: 4.7
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Milan Broz
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-11 19:35 UTC by Edwin Eefting
Modified: 2013-03-01 04:07 UTC (History)
12 users (show)

Fixed In Version: lvm2-cluster-2.02.42-7.el4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-16 16:36:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0274 0 normal SHIPPED_LIVE lvm2-cluster bug fix and enhancement update 2011-02-16 16:35:03 UTC

Description Edwin Eefting 2008-12-11 19:35:04 UTC
/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 20:16:32 UTC
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 21:59:36 UTC
Its about time, thanks ;)

Comment 3 Milan Broz 2010-10-04 10:54:01 UTC
yes, this initscript problem should be fixed in next update (4.9).

Comment 4 Milan Broz 2010-10-21 17:05:22 UTC
Fixed in lvm2-cluster-2.02.42-7.el4.

Comment 6 Corey Marthaler 2011-01-14 00:23:20 UTC
Fix verified in lvm2-cluster-2.02.42-9.el4.

Comment 7 errata-xmlrpc 2011-02-16 16:36:07 UTC
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.