The branch, 2.5 has been updated
       via  e5e99bf3912008ebcd5af6043689c72f206571b2 (commit)
       via  5cc80667a308692915bf940396ddf5b0e29aba01 (commit)
       via  e9a7277b06078b9f1883920a0a19796d4b3fbf2e (commit)
      from  76f8ce2ca2ab2c01e296a9374f23e8f6a36a5758 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=2.5


- Log -----------------------------------------------------------------
commit e5e99bf3912008ebcd5af6043689c72f206571b2
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Tue Feb 11 17:29:26 2014 +1100

    daemon: Consult CTDB_DEBUG_HUNG_SCRIPT variable before running debug script
    
    If CTDB_DEUB_HUNG_SCRIPT is set, use that instead of the default
    debug script.  This code was dropped by mistake in commit
    18c1f432102f1a5093927be9276d001180539e50.
    
    Signed-off-by: Amitay Isaacs <ami...@gmail.com>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>
    
    Autobuild-User(master): Martin Schwenke <mart...@samba.org>
    Autobuild-Date(master): Wed Feb 12 08:47:47 CET 2014 on sn-devel-104
    
    (Imported from commit 276b233c0090d51b59dbe06ae66a14ee09cbb4c2)

commit 5cc80667a308692915bf940396ddf5b0e29aba01
Author: Srikrishan Malik <srima...@in.ibm.com>
Date:   Mon Feb 10 11:19:08 2014 +0530

    eventscripts: Create extra files for ganesha recovery
    
    This adds new files for Ganesha's recovery.  myreleaseip_* are used by
    the recovery thread on the node where IP is released. The releaseip_*
    and tekeip_* files are used by recovery thread where IP is taken over.
    
    Signed-off-by: Srikrishan Malik <srima...@in.ibm.com>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>
    
    (Imported from commit 9a2a5a2f7c7d3d6b4c03bb97e134ca0452a83bb8)

commit e9a7277b06078b9f1883920a0a19796d4b3fbf2e
Author: Srikrishan Malik <srima...@in.ibm.com>
Date:   Mon Feb 10 11:10:48 2014 +0530

    eventscripts: Run mmlsconfig only once and use cached results
    
    Signed-off-by: Srikrishan Malik <srima...@in.ibm.com>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>
    
    (Imported from commit 6b378f2f76e433023e57dd78bc3f98e0ef1f34f1)

-----------------------------------------------------------------------

Summary of changes:
 config/events.d/60.ganesha |   24 ++++++++++++++++++++++--
 server/eventscript.c       |    4 ++++
 2 files changed, 26 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.ganesha b/config/events.d/60.ganesha
index 43e6758..a0a9764 100755
--- a/config/events.d/60.ganesha
+++ b/config/events.d/60.ganesha
@@ -50,6 +50,8 @@ is_ctdb_managed_service || exit 0
 
 ctdb_service_check_reconfigure
 
+nodenum_file="${service_state_dir}/gpfs_nodenum"
+
 get_cluster_fs_state  ()
 {
     case $CTDB_CLUSTER_FILESYSTEM_TYPE in
@@ -63,6 +65,21 @@ get_cluster_fs_state  ()
    esac
 }
 
+create_nodenum_file()
+{
+    NNUM=$(/usr/lpp/mmfs/bin/mmlsconfig myNodeConfigNumber | awk '{print $2}')
+    echo $NNUM > $nodenum_file
+}
+
+get_nodenum()
+{
+    if [ ! -f $nodenum_file ]; then
+        create_nodenum_file
+    fi
+    cat $nodenum_file
+}
+
+
 create_ganesha_recdirs ()
 {
     MOUNTS=$(mount -t $CTDB_CLUSTER_FILESYSTEM_TYPE)
@@ -153,6 +170,7 @@ case "$1" in
      startup)
        create_ganesha_recdirs
        ctdb_service_start
+       create_nodenum_file
        ;;
 
      shutdown)
@@ -163,7 +181,7 @@ case "$1" in
        if [ -n "$2" ] ; then
            case  $CTDB_CLUSTER_FILESYSTEM_TYPE in
                gpfs)
-                   NNUM=`/usr/lpp/mmfs/bin/mmlsconfig myNodeConfigNumber | awk 
'{print $2}'`
+                   NNUM=$(get_nodenum)
                    TDATE=`date +"%s"`
                    TOUCHTGT=$1"_"$TDATE"_"$NNUM"_"$3"_"$4"_"$2
                    touch $GANRECDIR2/$TOUCHTGT
@@ -177,10 +195,12 @@ case "$1" in
        if [ -n "$2" ] ; then
            case  $CTDB_CLUSTER_FILESYSTEM_TYPE in
                gpfs)
-                   NNUM=`/usr/lpp/mmfs/bin/mmlsconfig myNodeConfigNumber | awk 
'{print $2}'`
+                   NNUM=$(get_nodenum)
                    TDATE=`date +"%s"`
                    TOUCHTGT=$1"_"$TDATE"_"$NNUM"_"$3"_"$4"_"$2
                    touch $GANRECDIR2/$TOUCHTGT
+                   TOUCHTGT="my"$TOUCHTGT
+                   touch $GANRECDIR2/$TOUCHTGT
                ;;
            esac
        fi
diff --git a/server/eventscript.c b/server/eventscript.c
index b85fed5..ed20124 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -456,6 +456,10 @@ static void ctdb_run_debug_hung_script(struct ctdb_context 
*ctdb, struct debug_h
                return;
        }
 
+       if (getenv("CTDB_DEBUG_HUNG_SCRIPT") != NULL) {
+               debug_hung_script = getenv("CTDB_DEBUG_HUNG_SCRIPT");
+       }
+
        argv = talloc_array(state, const char *, 5);
 
        argv[0] = talloc_asprintf(argv, "%d", fd[1]);


-- 
CTDB repository

Reply via email to