CVS User Account cvsuser
Wed Jul 5 14:00:20 PDT 2006
Log Message:
-----------
In Slony-I 1.1.x, there is a problem with the launch_cluster.sh script
where it is easy for a thread to fail and lead to the .PID file getting
removed.

launch_cluster.sh now searches to see if there is a "slon -f $CONFFILE"
running, and doesn't bother trying to start another slon if there is a
slon still running.

In 1.2, the slon should be less fragile and shouldn't be as prone to
removing .PID files, but this shouldn't actually damage behaviour...

Modified Files:
--------------
    slony1-engine/tools:
        launch_clusters.sh (r1.1 -> r1.2)

-------------- next part --------------
Index: launch_clusters.sh
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/launch_clusters.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -Ltools/launch_clusters.sh -Ltools/launch_clusters.sh -u -w -r1.1 -r1.2
--- tools/launch_clusters.sh
+++ tools/launch_clusters.sh
@@ -79,8 +79,13 @@
 	    echo "Slon already running - $SLONPID"
 	fi
     else
+	
+	if [[ PID=ps auxww | egrep "[s]lon -f $CONFIGPATH/conf/node${NODENUM}.conf" > /dev/null ]] ; then
+            echo "Slon already running - but PID marked dead"
+	else
 	invoke_slon $LOGHOME $NODENUM $CLUSTER $SLONCONF
     fi
+    fi
 }
 
 for cluster in `echo $CLUSTERS`; do



More information about the Slony1-commit mailing list