You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2013/04/04 01:28:23 UTC

svn commit: r1464236 - in /incubator/mesos/trunk/src/deploy: mesos-start-masters.sh.in mesos-start-slaves.sh.in mesos-stop-masters.sh.in mesos-stop-slaves.sh.in

Author: vinodkone
Date: Wed Apr  3 23:28:22 2013
New Revision: 1464236

URL: http://svn.apache.org/r1464236
Log:
Fixed deploy scripts to ignore commented out lines
in slaves/masters files.

From: Andrew Ash <an...@andrewash.com>
Review: https://reviews.apache.org/r/10244

Modified:
    incubator/mesos/trunk/src/deploy/mesos-start-masters.sh.in
    incubator/mesos/trunk/src/deploy/mesos-start-slaves.sh.in
    incubator/mesos/trunk/src/deploy/mesos-stop-masters.sh.in
    incubator/mesos/trunk/src/deploy/mesos-stop-slaves.sh.in

Modified: incubator/mesos/trunk/src/deploy/mesos-start-masters.sh.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/deploy/mesos-start-masters.sh.in?rev=1464236&r1=1464235&r2=1464236&view=diff
==============================================================================
--- incubator/mesos/trunk/src/deploy/mesos-start-masters.sh.in (original)
+++ incubator/mesos/trunk/src/deploy/mesos-start-masters.sh.in Wed Apr  3 23:28:22 2013
@@ -16,7 +16,26 @@ if test ! -e ${MASTERS_FILE}; then
   exit 1
 fi
 
-MASTERS=`cat ${MASTERS_FILE}`
+# The expected format of the MASTERS_FILE is one IP/host per line.
+# Additionally, you can temporarily comment out a host or IP by placing a hash
+# character '#' as the first character of the line.  As an example, changing
+# this MASTERS_FILE:
+#
+# 10.1.1.1
+# 10.1.1.2
+#
+# to this one:
+#
+# 10.1.1.1
+# #10.1.1.2
+#
+# removes the 10.1.1.2 IP address from being used.  Note that this does NOT
+# support comments through the end of line, like this:
+#
+# 10.1.1.1  # my first IP
+# 10.1.1.2  # my second IP
+#
+MASTERS=`cat ${MASTERS_FILE} | grep -v '^#'`
 
 daemon="@sbindir@/mesos-daemon.sh"
 
@@ -33,4 +52,4 @@ for master in ${MASTERS}; do
   sleep 0.1
 done
 
-wait # Wait for all the ssh's to finish.
\ No newline at end of file
+wait # Wait for all the ssh's to finish.

Modified: incubator/mesos/trunk/src/deploy/mesos-start-slaves.sh.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/deploy/mesos-start-slaves.sh.in?rev=1464236&r1=1464235&r2=1464236&view=diff
==============================================================================
--- incubator/mesos/trunk/src/deploy/mesos-start-slaves.sh.in (original)
+++ incubator/mesos/trunk/src/deploy/mesos-start-slaves.sh.in Wed Apr  3 23:28:22 2013
@@ -16,7 +16,26 @@ if test ! -e ${SLAVES_FILE}; then
   exit 1
 fi
 
-SLAVES=`cat ${SLAVES_FILE}`
+# The expected format of the SLAVES_FILE is one IP/host per line.
+# Additionally, you can temporarily comment out a host or IP by placing a hash
+# character '#' as the first character of the line.  As an example, changing
+# this MASTERS_FILE:
+#
+# 10.1.1.1
+# 10.1.1.2
+#
+# to this one:
+#
+# 10.1.1.1
+# #10.1.1.2
+#
+# removes the 10.1.1.2 IP address from being used.  Note that this does NOT
+# support comments through the end of line, like this:
+#
+# 10.1.1.1  # my first IP
+# 10.1.1.2  # my second IP
+#
+SLAVES=`cat ${SLAVES_FILE} | grep -v '^#'`
 
 daemon="@sbindir@/mesos-daemon.sh"
 
@@ -33,4 +52,4 @@ for slave in ${SLAVES}; do
   sleep 0.1
 done
 
-wait # Wait for all the ssh's to finish.
\ No newline at end of file
+wait # Wait for all the ssh's to finish.

Modified: incubator/mesos/trunk/src/deploy/mesos-stop-masters.sh.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/deploy/mesos-stop-masters.sh.in?rev=1464236&r1=1464235&r2=1464236&view=diff
==============================================================================
--- incubator/mesos/trunk/src/deploy/mesos-stop-masters.sh.in (original)
+++ incubator/mesos/trunk/src/deploy/mesos-stop-masters.sh.in Wed Apr  3 23:28:22 2013
@@ -15,7 +15,26 @@ if test ! -e ${MASTERS_FILE}; then
   exit 1
 fi
 
-MASTERS=`cat ${MASTERS_FILE}`
+# The expected format of the MASTERS_FILE is one IP/host per line.
+# Additionally, you can temporarily comment out a host or IP by placing a hash
+# character '#' as the first character of the line.  As an example, changing
+# this MASTERS_FILE:
+#
+# 10.1.1.1
+# 10.1.1.2
+#
+# to this one:
+#
+# 10.1.1.1
+# #10.1.1.2
+#
+# removes the 10.1.1.2 IP address from being used.  Note that this does NOT
+# support comments through the end of line, like this:
+#
+# 10.1.1.1  # my first IP
+# 10.1.1.2  # my second IP
+#
+MASTERS=`cat ${MASTERS_FILE} | grep -v '^#'`
 
 killall="killall"
 

Modified: incubator/mesos/trunk/src/deploy/mesos-stop-slaves.sh.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/deploy/mesos-stop-slaves.sh.in?rev=1464236&r1=1464235&r2=1464236&view=diff
==============================================================================
--- incubator/mesos/trunk/src/deploy/mesos-stop-slaves.sh.in (original)
+++ incubator/mesos/trunk/src/deploy/mesos-stop-slaves.sh.in Wed Apr  3 23:28:22 2013
@@ -14,7 +14,26 @@ if test ! -e ${SLAVES_FILE}; then
   exit 1
 fi
 
-SLAVES=`cat ${SLAVES_FILE}`
+# The expected format of the SLAVES_FILE is one IP/host per line.
+# Additionally, you can temporarily comment out a host or IP by placing a hash
+# character '#' as the first character of the line.  As an example, changing
+# this MASTERS_FILE:
+#
+# 10.1.1.1
+# 10.1.1.2
+#
+# to this one:
+#
+# 10.1.1.1
+# #10.1.1.2
+#
+# removes the 10.1.1.2 IP address from being used.  Note that this does NOT
+# support comments through the end of line, like this:
+#
+# 10.1.1.1  # my first IP
+# 10.1.1.2  # my second IP
+#
+SLAVES=`cat ${SLAVES_FILE} | grep -v '^#'`
 
 killall="killall"