You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 10:23:16 UTC

svn commit: r1132008 - in /incubator/mesos/trunk/src/deploy: mesos-daemon mesos-env.sh stop-mesos

Author: benh
Date: Sun Jun  5 08:23:16 2011
New Revision: 1132008

URL: http://svn.apache.org/viewvc?rev=1132008&view=rev
Log:
Further tweaks to deploy scripts

Modified:
    incubator/mesos/trunk/src/deploy/mesos-daemon
    incubator/mesos/trunk/src/deploy/mesos-env.sh
    incubator/mesos/trunk/src/deploy/stop-mesos

Modified: incubator/mesos/trunk/src/deploy/mesos-daemon
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/deploy/mesos-daemon?rev=1132008&r1=1132007&r2=1132008&view=diff
==============================================================================
--- incubator/mesos/trunk/src/deploy/mesos-daemon (original)
+++ incubator/mesos/trunk/src/deploy/mesos-daemon Sun Jun  5 08:23:16 2011
@@ -22,10 +22,6 @@ if [ "$PROGRAM" == "mesos-slave" ]; then
 fi
 
 
-if [ ! -d $MESOS_LOGS ]; then
-  mkdir -p $MESOS_LOGS
-fi
-
 cd $MESOS_HOME
 echo "now in dir `pwd`"
-nohup ./bin/$PROGRAM $EXTRA_OPTS $@ </dev/null >$MESOS_LOGS/$PROGRAM.out 2>&1 &
+nohup ./bin/$PROGRAM $EXTRA_OPTS $@ </dev/null >/dev/null 2>&1 &

Modified: incubator/mesos/trunk/src/deploy/mesos-env.sh
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/deploy/mesos-env.sh?rev=1132008&r1=1132007&r2=1132008&view=diff
==============================================================================
--- incubator/mesos/trunk/src/deploy/mesos-env.sh (original)
+++ incubator/mesos/trunk/src/deploy/mesos-env.sh Sun Jun  5 08:23:16 2011
@@ -3,21 +3,31 @@
 DEPLOY_DIR=`dirname "$0"`
 DEPLOY_DIR=`cd "$DEPLOY_DIR"; pwd`
 
-echo DEPLOY_DIR is $DEPLOY_DIR
-
-#files that list master(s) and slaves
-MASTER=`cat $DEPLOY_DIR/master`
-SLAVES=`cat $DEPLOY_DIR/slaves`
-
-#The dir where Mesos deployment scripts live
+# Locate MESOS_HOME relative to deploy directory
 MESOS_HOME=`cd "$DEPLOY_DIR/.."; pwd`
-echo "MESOS_HOME is $MESOS_HOME"
 
-MESOS_LOGS=$MESOS_HOME/logs
+# Find files that list master and slaves
+MASTER_FILE="$MESOS_HOME/conf/master"
+if [ -e "$MASTER_FILE" ]; then
+  MASTER=`cat "$MASTER_FILE"`
+else
+  echo "Error: $MASTER_FILE does not exist" >&2
+  exit 1
+fi
+SLAVES_FILE="$MESOS_HOME/conf/slaves"
+if [ -e "$SLAVES_FILE" ]; then
+  SLAVES=`cat "$SLAVES_FILE"`
+else
+  echo "Error: $SLAVES_FILE does not exist" >&2
+  exit 1
+fi
 
-#options for ssh'ing
+# Options for SSH
 SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=2"
 
-#LIBPROCESS_IP="hostname -i" #works on older versions of hostname, not on osx
+# Set LIBPROCESS_IP to change the address to which the master and slaves bind
+# if the default address chosen by the system is not the right one. We include
+# two examples below that try to resolve the IP from the node's hostname.
+#LIBPROCESS_IP="hostname -i" #works on older versions of hostname, not on OS X
 #FULL_IP="hostname --all-ip-addresses" # newer versions of hostname only
 #export LIBPROCESS_IP=`echo $FULL_IP|sed 's/\([^ ]*\) .*/\1/'`

Modified: incubator/mesos/trunk/src/deploy/stop-mesos
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/deploy/stop-mesos?rev=1132008&r1=1132007&r2=1132008&view=diff
==============================================================================
--- incubator/mesos/trunk/src/deploy/stop-mesos (original)
+++ incubator/mesos/trunk/src/deploy/stop-mesos Sun Jun  5 08:23:16 2011
@@ -7,5 +7,5 @@ DEPLOY_DIR=`cd "$DEPLOY_DIR"; pwd`
 cd $DEPLOY_DIR
 
 ./stop-slaves
-
+sleep 1
 ./stop-master