Bug 1105118 - CTDB:Adding volume set option in hook script causes delay in glusterd operations.
Summary: CTDB:Adding volume set option in hook script causes delay in glusterd operati...
Keywords:
Status: CLOSED DUPLICATE of bug 1091600
Alias: None
Product: GlusterFS
Classification: Community
Component: gluster-smb
Version: pre-release
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
Assignee: Raghavendra Talur
QA Contact:
URL:
Whiteboard:
Depends On: 1105102
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-05 12:33 UTC by Raghavendra Talur
Modified: 2014-07-13 11:20 UTC (History)
6 users (show)

Fixed In Version:
Clone Of: 1105102
Environment:
Last Closed: 2014-07-13 11:20:39 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Talur 2014-06-05 12:33:24 UTC
+++ This bug was initially created as a clone of Bug #1105102 +++

Description of problem:
In a ctdb setup when we start a volume the hook scripts are supposed to mount the ctdb vol on /gluster/lock and add the entry to fstab. 

With the changes in hook script as follows  where we are adding volume set option for ping timeout for ctdb volume , and then do the mount and add entry in fstab ,it is causing delay in mount and showing inconsistent behaviour.
script location:
/var/lib/glusterd/hooks/1/start/post/S29CTDBsetup.sh

function add_ping_timeout () {
    volname=$1
    value=$2
    gluster volume set $volname network.ping-timeout $value
}

sleep 5
    # Make sure ping-timeout is not default for CTDB volume
    add_ping_timeout $VOL $PING_TIMEOUT_SECS;
    mount -t glusterfs `hostname`:$VOL "$CTDB_MNT" && \
        add_fstab_entry $VOL $CTDB_MNT

As in ctdb customer scenario we run these hook scripts on multiple nodes(scaling)together and running these gluster volume set option causes delay in gluster operations and we get following error.

ctdb: failed: Another transaction is in progress. Please try again after sometime.

*****************
If we need ping timeout value to be set for ctdb volume it would be better to add it manually after we create the ctdb volume instead of handling it in hook script.



How reproducible:
Always

Steps to Reproduce:
1.Create a ctdb volume
2.start the volume


Actual results:
ctdb volume starts but the mount is taking long time and any gluster operation
gets delayed and give following error:

ctdb: failed: Another transaction is in progress. Please try again after sometime.

Expected results:
On all the nodes the mount of ctdb volume happens immediately the volume is started and none of the glusterd operations should be delayed.


Additional info:
We can add the ping time out option manually for ctdb volume or should handle it out of hook scripts because it may cause issues in multi-node environment.

Comment 1 Anand Avati 2014-06-05 12:41:15 UTC
REVIEW: http://review.gluster.org/7993 (extras/hookscripts: Do not run glusterd operations from hookscript.) posted (#1) for review on master by Raghavendra Talur (rtalur)

Comment 2 Niels de Vos 2014-07-13 11:20:39 UTC

*** This bug has been marked as a duplicate of bug 1091600 ***


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