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 2016/04/15 01:55:43 UTC
[1/2] mesos git commit: Duplicate/Rename slave/agent binaries and
shell scripts.
Repository: mesos
Updated Branches:
refs/heads/master 6a57889ce -> 5cd32bf81
Duplicate/Rename slave/agent binaries and shell scripts.
In this patch, we did the following changes:
1. Duplicate executable file 'mesos-slave' with 'mesos-agent'
2. Rename the scripts in folder 'mesos/bin' & 'mesos/src/deploy'
to use term 'agent' instead of term 'slave'
3. Change the content of ths scripts to use term 'agent' instead
of term 'slave'
4. Duplicate the renamed scripts renamed in #2 during the configure
and make process, the duplicated scripts still use term 'slave'
in their names.
Please note that a re-bootstrap is required once this patch has
been applied. Otherwise, configure will break because of the
missing mesos-slave-*.sh scripts.
Review: https://reviews.apache.org/r/45806/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c83d71c0
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c83d71c0
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c83d71c0
Branch: refs/heads/master
Commit: c83d71c076935e1d52889e73fbd6be608c6d3e19
Parents: 6a57889
Author: zhou xing <xi...@cn.ibm.com>
Authored: Thu Apr 14 18:50:50 2016 -0500
Committer: Vinod Kone <vi...@gmail.com>
Committed: Thu Apr 14 18:52:13 2016 -0500
----------------------------------------------------------------------
CHANGELOG | 1 +
bin/gdb-mesos-agent.sh.in | 41 ++++++++++++++++++++
bin/gdb-mesos-slave.sh.in | 41 --------------------
bin/lldb-mesos-agent.sh.in | 41 ++++++++++++++++++++
bin/lldb-mesos-slave.sh.in | 41 --------------------
bin/mesos-agent-flags.sh.in | 37 ++++++++++++++++++
bin/mesos-agent.sh.in | 24 ++++++++++++
bin/mesos-local-flags.sh.in | 2 +-
bin/mesos-slave-flags.sh.in | 37 ------------------
bin/mesos-slave.sh.in | 24 ------------
bin/valgrind-mesos-agent.sh.in | 53 ++++++++++++++++++++++++++
bin/valgrind-mesos-slave.sh.in | 53 --------------------------
configure.ac | 51 +++++++++++++++++++------
src/Makefile.am | 32 +++++++++++++---
src/deploy/mesos-agent-env.sh.template | 15 ++++++++
src/deploy/mesos-deploy-env.sh.template | 2 +-
src/deploy/mesos-slave-env.sh.template | 15 --------
src/deploy/mesos-start-agents.sh.in | 55 +++++++++++++++++++++++++++
src/deploy/mesos-start-cluster.sh.in | 6 +--
src/deploy/mesos-start-slaves.sh.in | 55 ---------------------------
src/deploy/mesos-stop-agents.sh.in | 51 +++++++++++++++++++++++++
src/deploy/mesos-stop-cluster.sh.in | 4 +-
src/deploy/mesos-stop-slaves.sh.in | 51 -------------------------
src/slave/containerizer/mesos/launch.cpp | 6 +--
src/tests/balloon_framework_test.sh | 32 ++++++++--------
support/generate-endpoint-help.py | 6 +--
support/test-upgrade.py | 2 +-
27 files changed, 414 insertions(+), 364 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 1e07c8c..915c592 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -70,6 +70,7 @@ Additional API Changes:
Binary API Changes:
* [MESOS-5055] - Replace Master/Slave Terminology Phase I - Update strings in
the log message and standard output
+ * [MESOS-3782] - Replace Master/Slave Terminology Phase I - Duplicate/Rename binaries.
Release Notes - Mesos - Version 0.28.1
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/gdb-mesos-agent.sh.in
----------------------------------------------------------------------
diff --git a/bin/gdb-mesos-agent.sh.in b/bin/gdb-mesos-agent.sh.in
new file mode 100644
index 0000000..1e02c48
--- /dev/null
+++ b/bin/gdb-mesos-agent.sh.in
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a wrapper for running gdb on mesos-agent before it is
+# installed that first sets up some flags via environment variables.
+
+# Use colors for errors.
+. @abs_top_srcdir@/support/colors.sh
+
+LIBTOOL=@abs_top_builddir@/libtool
+
+test ! -e ${LIBTOOL} && \
+ echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" && \
+ exit 1
+
+# Confirm libtool has "gdb" support.
+${LIBTOOL} --mode=execute gdb -batch >/dev/null 2>&1
+
+test $? != 0 && \
+ echo "${RED}Generated libtool doesn't appear to support gdb. Please also make sure gdb is installed.${NORMAL}" && \
+ exit 1
+
+. @abs_top_builddir@/bin/mesos-agent-flags.sh
+
+exec ${LIBTOOL} --mode=execute gdb --args \
+ @abs_top_builddir@/src/mesos-agent "${@}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/gdb-mesos-slave.sh.in
----------------------------------------------------------------------
diff --git a/bin/gdb-mesos-slave.sh.in b/bin/gdb-mesos-slave.sh.in
deleted file mode 100644
index dbeec84..0000000
--- a/bin/gdb-mesos-slave.sh.in
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a wrapper for running gdb on mesos-slave before it is
-# installed that first sets up some flags via environment variables.
-
-# Use colors for errors.
-. @abs_top_srcdir@/support/colors.sh
-
-LIBTOOL=@abs_top_builddir@/libtool
-
-test ! -e ${LIBTOOL} && \
- echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" && \
- exit 1
-
-# Confirm libtool has "gdb" support.
-${LIBTOOL} --mode=execute gdb -batch >/dev/null 2>&1
-
-test $? != 0 && \
- echo "${RED}Generated libtool doesn't appear to support gdb. Please also make sure gdb is installed.${NORMAL}" && \
- exit 1
-
-. @abs_top_builddir@/bin/mesos-slave-flags.sh
-
-exec ${LIBTOOL} --mode=execute gdb --args \
- @abs_top_builddir@/src/mesos-slave "${@}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/lldb-mesos-agent.sh.in
----------------------------------------------------------------------
diff --git a/bin/lldb-mesos-agent.sh.in b/bin/lldb-mesos-agent.sh.in
new file mode 100644
index 0000000..480d6ce
--- /dev/null
+++ b/bin/lldb-mesos-agent.sh.in
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a wrapper for running lldb on mesos-agent before it is
+# installed that first sets up some flags via environment variables.
+
+# Use colors for errors.
+. @abs_top_srcdir@/support/colors.sh
+
+LIBTOOL=@abs_top_builddir@/libtool
+
+test ! -e ${LIBTOOL} && \
+ echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" && \
+ exit 1
+
+# Confirm libtool has "lldb" support.
+${LIBTOOL} --mode=execute lldb -batch >/dev/null 2>&1
+
+test $? != 0 && \
+ echo "${RED}Generated libtool doesn't appear to support lldb${NORMAL}" && \
+ exit 1
+
+. @abs_top_builddir@/bin/mesos-agent-flags.sh
+
+exec ${LIBTOOL} --mode=execute lldb -- \
+ @abs_top_builddir@/src/mesos-agent "${@}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/lldb-mesos-slave.sh.in
----------------------------------------------------------------------
diff --git a/bin/lldb-mesos-slave.sh.in b/bin/lldb-mesos-slave.sh.in
deleted file mode 100644
index 896c411..0000000
--- a/bin/lldb-mesos-slave.sh.in
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a wrapper for running lldb on mesos-slave before it is
-# installed that first sets up some flags via environment variables.
-
-# Use colors for errors.
-. @abs_top_srcdir@/support/colors.sh
-
-LIBTOOL=@abs_top_builddir@/libtool
-
-test ! -e ${LIBTOOL} && \
- echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" && \
- exit 1
-
-# Confirm libtool has "lldb" support.
-${LIBTOOL} --mode=execute lldb -batch >/dev/null 2>&1
-
-test $? != 0 && \
- echo "${RED}Generated libtool doesn't appear to support lldb${NORMAL}" && \
- exit 1
-
-. @abs_top_builddir@/bin/mesos-slave-flags.sh
-
-exec ${LIBTOOL} --mode=execute lldb -- \
- @abs_top_builddir@/src/mesos-slave "${@}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/mesos-agent-flags.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-agent-flags.sh.in b/bin/mesos-agent-flags.sh.in
new file mode 100644
index 0000000..8c936aa
--- /dev/null
+++ b/bin/mesos-agent-flags.sh.in
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+export MESOS_LAUNCHER_DIR=@abs_top_builddir@/src
+
+# Add the JNI library so we can run JVM based executors without them
+# needing to figure this out for themselves.
+# NOTE: MESOS_NATIVE_LIBRARY is deprecated for use on JVM based
+# frameworks, use MESOS_NATIVE_JAVA_LIBRARY instead as that is
+# the JNI specific library binding. Future releases of libmesos
+# will not contain JNI bindings.
+# TODO(tillt): Point MESOS_NATIVE_JAVA_LIBRARY towards the JNI
+# specific library once libmesos has been split.
+if test $(uname) = 'Darwin'; then
+ MESOS_NATIVE_JAVA_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.dylib
+ MESOS_NATIVE_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.dylib
+else
+ MESOS_NATIVE_JAVA_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.so
+ MESOS_NATIVE_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.so
+fi
+export MESOS_NATIVE_LIBRARY
+export MESOS_NATIVE_JAVA_LIBRARY
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/mesos-agent.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-agent.sh.in b/bin/mesos-agent.sh.in
new file mode 100644
index 0000000..adf79e0
--- /dev/null
+++ b/bin/mesos-agent.sh.in
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a wrapper for running mesos-agent before it is installed
+# that sets up some flags environment variables.
+
+. @abs_top_builddir@/bin/mesos-agent-flags.sh
+
+exec @abs_top_builddir@/src/mesos-agent "${@}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/mesos-local-flags.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-local-flags.sh.in b/bin/mesos-local-flags.sh.in
index ab5b6c8..5b4553a 100644
--- a/bin/mesos-local-flags.sh.in
+++ b/bin/mesos-local-flags.sh.in
@@ -19,4 +19,4 @@
export MESOS_WORK_DIR=/tmp/mesos
. @abs_top_builddir@/bin/mesos-master-flags.sh
-. @abs_top_builddir@/bin/mesos-slave-flags.sh
+. @abs_top_builddir@/bin/mesos-agent-flags.sh
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/mesos-slave-flags.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-slave-flags.sh.in b/bin/mesos-slave-flags.sh.in
deleted file mode 100644
index 8c936aa..0000000
--- a/bin/mesos-slave-flags.sh.in
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-export MESOS_LAUNCHER_DIR=@abs_top_builddir@/src
-
-# Add the JNI library so we can run JVM based executors without them
-# needing to figure this out for themselves.
-# NOTE: MESOS_NATIVE_LIBRARY is deprecated for use on JVM based
-# frameworks, use MESOS_NATIVE_JAVA_LIBRARY instead as that is
-# the JNI specific library binding. Future releases of libmesos
-# will not contain JNI bindings.
-# TODO(tillt): Point MESOS_NATIVE_JAVA_LIBRARY towards the JNI
-# specific library once libmesos has been split.
-if test $(uname) = 'Darwin'; then
- MESOS_NATIVE_JAVA_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.dylib
- MESOS_NATIVE_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.dylib
-else
- MESOS_NATIVE_JAVA_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.so
- MESOS_NATIVE_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.so
-fi
-export MESOS_NATIVE_LIBRARY
-export MESOS_NATIVE_JAVA_LIBRARY
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/mesos-slave.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-slave.sh.in b/bin/mesos-slave.sh.in
deleted file mode 100644
index 1e3b748..0000000
--- a/bin/mesos-slave.sh.in
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a wrapper for running mesos-slave before it is installed
-# that sets up some flags environment variables.
-
-. @abs_top_builddir@/bin/mesos-slave-flags.sh
-
-exec @abs_top_builddir@/src/mesos-slave "${@}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/valgrind-mesos-agent.sh.in
----------------------------------------------------------------------
diff --git a/bin/valgrind-mesos-agent.sh.in b/bin/valgrind-mesos-agent.sh.in
new file mode 100644
index 0000000..08d9730
--- /dev/null
+++ b/bin/valgrind-mesos-agent.sh.in
@@ -0,0 +1,53 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a wrapper for running valgrind on mesos-agent before it is
+# installed that first sets up some flags via environment variables.
+
+# Use colors for errors.
+. @abs_top_srcdir@/support/colors.sh
+
+# Default valgrind tool is "memcheck".
+VALGRINDTOOL=memcheck
+
+# For supplying alternative tools (e.g. "helgrind"), use the -t option.
+while getopts ":t:" opt
+do
+ case "${opt}" in
+ t) VALGRINDTOOL=${OPTARG}; shift 2
+ ;;
+ esac
+done
+
+LIBTOOL=@abs_top_builddir@/libtool
+
+test ! -e ${LIBTOOL} && \
+ echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" \
+ && exit 1
+
+# Confirm libtool has "valgrind" support.
+${LIBTOOL} --mode=execute valgrind --version >/dev/null 2>&1
+
+test $? != 0 && \
+ echo "${RED}Generated libtool doesn't appear to support valgrind${NORMAL}" \
+ && exit 1
+
+. @abs_top_builddir@/bin/mesos-agent-flags.sh
+
+exec ${LIBTOOL} --mode=execute valgrind --tool=${VALGRINDTOOL} \
+ @abs_top_builddir@/src/mesos-agent "${@}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/bin/valgrind-mesos-slave.sh.in
----------------------------------------------------------------------
diff --git a/bin/valgrind-mesos-slave.sh.in b/bin/valgrind-mesos-slave.sh.in
deleted file mode 100644
index 900c588..0000000
--- a/bin/valgrind-mesos-slave.sh.in
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a wrapper for running valgrind on mesos-slave before it is
-# installed that first sets up some flags via environment variables.
-
-# Use colors for errors.
-. @abs_top_srcdir@/support/colors.sh
-
-# Default valgrind tool is "memcheck".
-VALGRINDTOOL=memcheck
-
-# For supplying alternative tools (e.g. "helgrind"), use the -t option.
-while getopts ":t:" opt
-do
- case "${opt}" in
- t) VALGRINDTOOL=${OPTARG}; shift 2
- ;;
- esac
-done
-
-LIBTOOL=@abs_top_builddir@/libtool
-
-test ! -e ${LIBTOOL} && \
- echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" \
- && exit 1
-
-# Confirm libtool has "valgrind" support.
-${LIBTOOL} --mode=execute valgrind --version >/dev/null 2>&1
-
-test $? != 0 && \
- echo "${RED}Generated libtool doesn't appear to support valgrind${NORMAL}" \
- && exit 1
-
-. @abs_top_builddir@/bin/mesos-slave-flags.sh
-
-exec ${LIBTOOL} --mode=execute valgrind --tool=${VALGRINDTOOL} \
- @abs_top_builddir@/src/mesos-slave "${@}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 4392909..ae91a07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,38 +76,65 @@ AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([3rdparty/Makefile])
AC_CONFIG_FILES([bin/mesos.sh], [chmod +x bin/mesos.sh])
+AC_CONFIG_FILES([bin/mesos-agent.sh], [chmod +x bin/mesos-agent.sh])
AC_CONFIG_FILES([bin/mesos-local.sh], [chmod +x bin/mesos-local.sh])
AC_CONFIG_FILES([bin/mesos-master.sh], [chmod +x bin/mesos-master.sh])
-AC_CONFIG_FILES([bin/mesos-slave.sh], [chmod +x bin/mesos-slave.sh])
+# TODO(tomxing): Remove this script once the
+# slave->agent rename is complete(MESOS-3782).
+AC_CONFIG_FILES([bin/mesos-slave.sh:bin/mesos-agent.sh.in],
+ [chmod +x bin/mesos-slave.sh])
AC_CONFIG_FILES([bin/mesos-tests.sh], [chmod +x bin/mesos-tests.sh])
+AC_CONFIG_FILES([bin/mesos-agent-flags.sh])
AC_CONFIG_FILES([bin/mesos-local-flags.sh])
AC_CONFIG_FILES([bin/mesos-master-flags.sh])
-AC_CONFIG_FILES([bin/mesos-slave-flags.sh])
+# TODO(tomxing): Remove this script once the
+# slave->agent rename is complete(MESOS-3782).
+AC_CONFIG_FILES([bin/mesos-slave-flags.sh:bin/mesos-agent-flags.sh.in])
AC_CONFIG_FILES([bin/mesos-tests-flags.sh])
+AC_CONFIG_FILES([bin/gdb-mesos-agent.sh], [chmod +x bin/gdb-mesos-agent.sh])
AC_CONFIG_FILES([bin/gdb-mesos-local.sh], [chmod +x bin/gdb-mesos-local.sh])
AC_CONFIG_FILES([bin/gdb-mesos-master.sh], [chmod +x bin/gdb-mesos-master.sh])
-AC_CONFIG_FILES([bin/gdb-mesos-slave.sh], [chmod +x bin/gdb-mesos-slave.sh])
+# TODO(tomxing): Remove this script once the
+# slave->agent rename is complete(MESOS-3782).
+AC_CONFIG_FILES([bin/gdb-mesos-slave.sh:bin/gdb-mesos-agent.sh.in],
+ [chmod +x bin/gdb-mesos-slave.sh])
AC_CONFIG_FILES([bin/gdb-mesos-tests.sh], [chmod +x bin/gdb-mesos-tests.sh])
+AC_CONFIG_FILES([bin/lldb-mesos-agent.sh], [chmod +x bin/lldb-mesos-agent.sh])
AC_CONFIG_FILES([bin/lldb-mesos-local.sh], [chmod +x bin/lldb-mesos-local.sh])
AC_CONFIG_FILES([bin/lldb-mesos-master.sh],
- [chmod +x bin/lldb-mesos-master.sh])
-AC_CONFIG_FILES([bin/lldb-mesos-slave.sh], [chmod +x bin/lldb-mesos-slave.sh])
+ [chmod +x bin/lldb-mesos-master.sh])
+# TODO(tomxing): Remove this script once the
+# slave->agent rename is complete(MESOS-3782).
+AC_CONFIG_FILES([bin/lldb-mesos-slave.sh:bin/lldb-mesos-agent.sh.in],
+ [chmod +x bin/lldb-mesos-slave.sh])
AC_CONFIG_FILES([bin/lldb-mesos-tests.sh], [chmod +x bin/lldb-mesos-tests.sh])
+AC_CONFIG_FILES([bin/valgrind-mesos-agent.sh],
+ [chmod +x bin/valgrind-mesos-agent.sh])
AC_CONFIG_FILES([bin/valgrind-mesos-local.sh],
- [chmod +x bin/valgrind-mesos-local.sh])
-AC_CONFIG_FILES([bin/valgrind-mesos-slave.sh],
- [chmod +x bin/valgrind-mesos-slave.sh])
+ [chmod +x bin/valgrind-mesos-local.sh])
AC_CONFIG_FILES([bin/valgrind-mesos-master.sh],
- [chmod +x bin/valgrind-mesos-master.sh])
+ [chmod +x bin/valgrind-mesos-master.sh])
+# TODO(tomxing): Remove this script once the
+# slave->agent rename is complete(MESOS-3782).
+AC_CONFIG_FILES([bin/valgrind-mesos-slave.sh:bin/valgrind-mesos-agent.sh.in],
+ [chmod +x bin/valgrind-mesos-slave.sh])
AC_CONFIG_FILES([bin/valgrind-mesos-tests.sh],
- [chmod +x bin/valgrind-mesos-tests.sh])
+ [chmod +x bin/valgrind-mesos-tests.sh])
AC_CONFIG_FILES([src/deploy/mesos-daemon.sh])
+AC_CONFIG_FILES([src/deploy/mesos-start-agents.sh])
AC_CONFIG_FILES([src/deploy/mesos-start-cluster.sh])
AC_CONFIG_FILES([src/deploy/mesos-start-masters.sh])
-AC_CONFIG_FILES([src/deploy/mesos-start-slaves.sh])
+# TODO(tomxing): Remove this script once the
+# slave->agent rename is complete(MESOS-3782).
+AC_CONFIG_FILES(
+ [src/deploy/mesos-start-slaves.sh:src/deploy/mesos-start-agents.sh.in])
+AC_CONFIG_FILES([src/deploy/mesos-stop-agents.sh])
AC_CONFIG_FILES([src/deploy/mesos-stop-cluster.sh])
AC_CONFIG_FILES([src/deploy/mesos-stop-masters.sh])
-AC_CONFIG_FILES([src/deploy/mesos-stop-slaves.sh])
+# TODO(tomxing): Remove this script once the
+# slave->agent rename is complete(MESOS-3782).
+AC_CONFIG_FILES(
+ [src/deploy/mesos-stop-slaves.sh:src/deploy/mesos-stop-agents.sh.in])
AC_CONFIG_FILES([include/mesos/version.hpp])
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 1ae0ea7..ec85526 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1158,11 +1158,18 @@ endif
# Binaries.
+sbin_PROGRAMS += mesos-agent
+mesos_agent_SOURCES = slave/main.cpp
+mesos_agent_CPPFLAGS = $(MESOS_CPPFLAGS)
+mesos_agent_LDADD = libmesos.la $(LDADD)
+
sbin_PROGRAMS += mesos-master
mesos_master_SOURCES = master/main.cpp
mesos_master_CPPFLAGS = $(MESOS_CPPFLAGS)
mesos_master_LDADD = libmesos.la $(LDADD)
+# TODO(tomxing): Remove this binary once the
+# slave->agent rename is complete(MESOS-3782).
sbin_PROGRAMS += mesos-slave
mesos_slave_SOURCES = slave/main.cpp
mesos_slave_CPPFLAGS = $(MESOS_CPPFLAGS)
@@ -1315,24 +1322,26 @@ nobase_dist_pkgdata_DATA += \
# And the deploy related stuff.
nodist_sbin_SCRIPTS += \
deploy/mesos-daemon.sh \
+ deploy/mesos-start-agents.sh \
deploy/mesos-start-cluster.sh \
deploy/mesos-start-masters.sh \
deploy/mesos-start-slaves.sh \
+ deploy/mesos-stop-agents.sh \
deploy/mesos-stop-cluster.sh \
deploy/mesos-stop-masters.sh \
deploy/mesos-stop-slaves.sh
pkgsysconf_DATA += \
+ deploy/mesos-agent-env.sh.template \
deploy/mesos-deploy-env.sh.template \
- deploy/mesos-master-env.sh.template \
- deploy/mesos-slave-env.sh.template
+ deploy/mesos-master-env.sh.template
# Need to explicitly add this because by default DATA files are not
# included in distributions.
EXTRA_DIST += \
+ deploy/mesos-agent-env.sh.template \
deploy/mesos-deploy-env.sh.template \
- deploy/mesos-master-env.sh.template \
- deploy/mesos-slave-env.sh.template
+ deploy/mesos-master-env.sh.template
# Java related files are listed outside if HAS_JAVA so we can add them
# to EXTRA_DIST unconditionally.
@@ -2102,11 +2111,19 @@ dist_testlibexec_SCRIPTS = \
endif
+# Copy mesos-agent-env.sh.template to mesos-slave-env.sh.template.
+#
+# TODO(tomxing): Remove this target once the
+# slave->agent rename is complete(MESOS-3782).
+copy-agent-env-template:
+ cp $(DESTDIR)/$(pkgsysconfdir)/mesos-agent-env.sh.template \
+ $(DESTDIR)/$(pkgsysconfdir)/mesos-slave-env.sh.template
+
# Install compatibility symlinks for modules that used to be in $(LIBDIR)
# but are now in $(PKGMODULEDIR). We use install-data-hook because it
# runs late in the install process after the target directories have
# been created.
-install-data-hook:
+install-data-hook: copy-agent-env-template
cd $(DESTDIR)/$(libdir) && \
for name in libfixed_resource_estimator \
libload_qos_controller \
@@ -2117,6 +2134,11 @@ install-data-hook:
done; \
done
+# TODO(tomxing): Remove this hook once the
+# slave->agent rename is complete(MESOS-3782).
+uninstall-hook:
+ rm -f $(DESTDIR)/$(pkgsysconfdir)/mesos-slave-env.sh.template
+
# We use a check-local target for now to avoid the parallel test
# runner that ships with newer versions of autotools.
# See the following discussion for the workaround:
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-agent-env.sh.template
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-agent-env.sh.template b/src/deploy/mesos-agent-env.sh.template
new file mode 100644
index 0000000..b3cee7d
--- /dev/null
+++ b/src/deploy/mesos-agent-env.sh.template
@@ -0,0 +1,15 @@
+# This file contains environment variables that are passed to mesos-agent.
+# To get a description of all options run mesos-agent --help; any option
+# supported as a command-line option is also supported as an environment
+# variable.
+
+# You must at least set MESOS_master.
+
+# The mesos master URL to contact. Should be host:port for
+# non-ZooKeeper based masters, otherwise a zk:// or file:// URL.
+export MESOS_master=unknown-machine:5050
+
+# Other options you're likely to want to set:
+# export MESOS_log_dir=/var/log/mesos
+# export MESOS_work_dir=/var/run/mesos
+# export MESOS_isolation=cgroups
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-deploy-env.sh.template
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-deploy-env.sh.template b/src/deploy/mesos-deploy-env.sh.template
index bea5584..4cae9af 100644
--- a/src/deploy/mesos-deploy-env.sh.template
+++ b/src/deploy/mesos-deploy-env.sh.template
@@ -9,5 +9,5 @@
export SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=2"
-# Use sudo for launching masters and slaves.
+# Use sudo for launching masters and agents.
#export DEPLOY_WITH_SUDO=1
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-slave-env.sh.template
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-slave-env.sh.template b/src/deploy/mesos-slave-env.sh.template
deleted file mode 100644
index 31567d6..0000000
--- a/src/deploy/mesos-slave-env.sh.template
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file contains environment variables that are passed to mesos-slave.
-# To get a description of all options run mesos-slave --help; any option
-# supported as a command-line option is also supported as an environment
-# variable.
-
-# You must at least set MESOS_master.
-
-# The mesos master URL to contact. Should be host:port for
-# non-ZooKeeper based masters, otherwise a zk:// or file:// URL.
-export MESOS_master=unknown-machine:5050
-
-# Other options you're likely to want to set:
-# export MESOS_log_dir=/var/log/mesos
-# export MESOS_work_dir=/var/run/mesos
-# export MESOS_isolation=cgroups
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-start-agents.sh.in
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-start-agents.sh.in b/src/deploy/mesos-start-agents.sh.in
new file mode 100644
index 0000000..ffb49cb
--- /dev/null
+++ b/src/deploy/mesos-start-agents.sh.in
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+
+DEPLOY_DIR=@sysconfdir@/@PACKAGE@
+
+# Pull in deploy specific options.
+test -e ${DEPLOY_DIR}/mesos-deploy-env.sh && \
+ . ${DEPLOY_DIR}/mesos-deploy-env.sh
+
+# Find the list of agents.
+AGENTS_FILE="${DEPLOY_DIR}/slaves"
+if test ! -e ${AGENTS_FILE}; then
+ echo "Failed to find ${AGENTS_FILE}"
+ exit 1
+fi
+
+# The expected format of the AGENTS_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
+#
+AGENTS=`cat ${AGENTS_FILE} | grep -v '^#'`
+
+daemon="@sbindir@/mesos-daemon.sh"
+
+# Add sudo if requested.
+if test "x${DEPLOY_WITH_SUDO}" = "x1"; then
+ daemon="sudo ${daemon}"
+fi
+
+# Launch agents.
+for agent in ${AGENTS}; do
+ echo "Starting mesos-agent on ${agent}"
+ echo ssh ${SSH_OPTS} ${agent} "${daemon} mesos-agent </dev/null >/dev/null"
+ ssh ${SSH_OPTS} ${agent} "${daemon} mesos-agent </dev/null >/dev/null" &
+ sleep 0.1
+done
+
+wait # Wait for all the ssh's to finish.
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-start-cluster.sh.in
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-start-cluster.sh.in b/src/deploy/mesos-start-cluster.sh.in
index f7a003d..a87a2b1 100644
--- a/src/deploy/mesos-start-cluster.sh.in
+++ b/src/deploy/mesos-start-cluster.sh.in
@@ -12,7 +12,7 @@ test -e ${DEPLOY_DIR}/mesos-deploy-env.sh && \
usage() {
echo "Usage: mesos-start-cluster.sh [-h] [-s]"
echo " -h display this message"
- echo " -s use sudo to start mesos-master and mesos-slave"
+ echo " -s use sudo to start mesos-master and mesos-agent"
if test ${#} -gt 0; then
echo
echo "${@}"
@@ -29,9 +29,9 @@ do
esac
done
-@sbindir@/mesos-start-masters.sh && sleep 1 && @sbindir@/mesos-start-slaves.sh && {
+@sbindir@/mesos-start-masters.sh && sleep 1 && @sbindir@/mesos-start-agents.sh && {
- # TODO(benh): Check the health of the masters (and possibly slaves)
+ # TODO(benh): Check the health of the masters (and possibly agents)
# and print the master's webui address (or just the leading master).
echo "Everything's started!"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-start-slaves.sh.in
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-start-slaves.sh.in b/src/deploy/mesos-start-slaves.sh.in
deleted file mode 100644
index 50860f4..0000000
--- a/src/deploy/mesos-start-slaves.sh.in
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env bash
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-
-DEPLOY_DIR=@sysconfdir@/@PACKAGE@
-
-# Pull in deploy specific options.
-test -e ${DEPLOY_DIR}/mesos-deploy-env.sh && \
- . ${DEPLOY_DIR}/mesos-deploy-env.sh
-
-# Find the list of slaves.
-SLAVES_FILE="${DEPLOY_DIR}/slaves"
-if test ! -e ${SLAVES_FILE}; then
- echo "Failed to find ${SLAVES_FILE}"
- exit 1
-fi
-
-# 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"
-
-# Add sudo if requested.
-if test "x${DEPLOY_WITH_SUDO}" = "x1"; then
- daemon="sudo ${daemon}"
-fi
-
-# Launch slaves.
-for slave in ${SLAVES}; do
- echo "Starting mesos-slave on ${slave}"
- echo ssh ${SSH_OPTS} ${slave} "${daemon} mesos-slave </dev/null >/dev/null"
- ssh ${SSH_OPTS} ${slave} "${daemon} mesos-slave </dev/null >/dev/null" &
- sleep 0.1
-done
-
-wait # Wait for all the ssh's to finish.
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-stop-agents.sh.in
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-stop-agents.sh.in b/src/deploy/mesos-stop-agents.sh.in
new file mode 100644
index 0000000..2451d6b
--- /dev/null
+++ b/src/deploy/mesos-stop-agents.sh.in
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+
+prefix=@prefix@
+DEPLOY_DIR=@sysconfdir@/@PACKAGE@
+
+# Pull in deploy specific options.
+test -e ${DEPLOY_DIR}/mesos-deploy-env.sh && \
+ . ${DEPLOY_DIR}/mesos-deploy-env.sh
+
+# Find the list of agents.
+AGENTS_FILE="${DEPLOY_DIR}/slaves"
+if test ! -e ${AGENTS_FILE}; then
+ echo "Failed to find ${AGENTS_FILE}"
+ exit 1
+fi
+
+# The expected format of the AGENTS_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
+#
+AGENTS=`cat ${AGENTS_FILE} | grep -v '^#'`
+
+killall="killall"
+
+# Add sudo if requested.
+if test "x${DEPLOY_WITH_SUDO}" = "x1"; then
+ killall="sudo ${killall}"
+fi
+
+for agent in ${AGENTS}; do
+ echo "Stopping mesos-agent on ${agent}"
+ ssh ${SSH_OPTS} ${agent} "${killall} mesos-agent" &
+ sleep 0.1
+done
+
+wait # Wait for all the ssh's to finish.
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-stop-cluster.sh.in
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-stop-cluster.sh.in b/src/deploy/mesos-stop-cluster.sh.in
index e5f8c1f..c522826 100644
--- a/src/deploy/mesos-stop-cluster.sh.in
+++ b/src/deploy/mesos-stop-cluster.sh.in
@@ -6,7 +6,7 @@ exec_prefix=@exec_prefix@
usage() {
echo "Usage: mesos-stop-cluster.sh [-h] [-s]"
echo " -h display this message"
- echo " -s use sudo to stop mesos-master and mesos-slave"
+ echo " -s use sudo to stop mesos-master and mesos-agent"
if test ${#} -gt 0; then
echo
echo "${@}"
@@ -23,7 +23,7 @@ do
esac
done
-@sbindir@/mesos-stop-slaves.sh && sleep 1 && @sbindir@/mesos-stop-masters.sh && {
+@sbindir@/mesos-stop-agents.sh && sleep 1 && @sbindir@/mesos-stop-masters.sh && {
# TODO(chengwei): see mesos-start-cluster.sh
echo "Everything's stopped!"
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/deploy/mesos-stop-slaves.sh.in
----------------------------------------------------------------------
diff --git a/src/deploy/mesos-stop-slaves.sh.in b/src/deploy/mesos-stop-slaves.sh.in
deleted file mode 100644
index 3dd9b51..0000000
--- a/src/deploy/mesos-stop-slaves.sh.in
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env bash
-
-prefix=@prefix@
-DEPLOY_DIR=@sysconfdir@/@PACKAGE@
-
-# Pull in deploy specific options.
-test -e ${DEPLOY_DIR}/mesos-deploy-env.sh && \
- . ${DEPLOY_DIR}/mesos-deploy-env.sh
-
-# Find the list of slaves.
-SLAVES_FILE="${DEPLOY_DIR}/slaves"
-if test ! -e ${SLAVES_FILE}; then
- echo "Failed to find ${SLAVES_FILE}"
- exit 1
-fi
-
-# 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"
-
-# Add sudo if requested.
-if test "x${DEPLOY_WITH_SUDO}" = "x1"; then
- killall="sudo ${killall}"
-fi
-
-for slave in ${SLAVES}; do
- echo "Stopping mesos-slave on ${slave}"
- ssh ${SSH_OPTS} ${slave} "${killall} mesos-slave" &
- sleep 0.1
-done
-
-wait # Wait for all the ssh's to finish.
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/slave/containerizer/mesos/launch.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/launch.cpp b/src/slave/containerizer/mesos/launch.cpp
index 54079c3..e22106b 100644
--- a/src/slave/containerizer/mesos/launch.cpp
+++ b/src/slave/containerizer/mesos/launch.cpp
@@ -149,7 +149,7 @@ int MesosContainerizerLaunch::execute()
errno == EINTR);
if (length != sizeof(dummy)) {
- // There's a reasonable probability this will occur during slave
+ // There's a reasonable probability this will occur during agent
// restarts across a large/busy cluster.
cerr << "Failed to synchronize with agent (it's probably exited)" << endl;
return 1;
@@ -162,7 +162,7 @@ int MesosContainerizerLaunch::execute()
}
// Run additional preparation commands. These are run as the same
- // user and with the environment as the slave.
+ // user and with the environment as the agent.
if (flags.commands.isSome()) {
// TODO(jieyu): Use JSON::Array if we have generic parse support.
JSON::Object object = flags.commands.get();
@@ -252,7 +252,7 @@ int MesosContainerizerLaunch::execute()
// Change user if provided. Note that we do that after executing the
// preparation commands so that those commands will be run with the
- // same privilege as the mesos-slave.
+ // same privilege as the mesos-agent.
// NOTE: The requisite user/group information must be present if
// a container root filesystem is used.
#ifndef __WINDOWS__
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/src/tests/balloon_framework_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/balloon_framework_test.sh b/src/tests/balloon_framework_test.sh
index ae32753..a242f6c 100755
--- a/src/tests/balloon_framework_test.sh
+++ b/src/tests/balloon_framework_test.sh
@@ -25,14 +25,14 @@ if [[ ! -d ${TEST_CGROUP_HIERARCHY} ]]; then
fi
MASTER_PID=
-SLAVE_PID=
+AGENT_PID=
MESOS_WORK_DIR=
-# This function ensures that we first kill the slave (if present) and
-# then cleanup the cgroups. This is necessary because a running slave
+# This function ensures that we first kill the agent (if present) and
+# then cleanup the cgroups. This is necessary because a running agent
# holds an advisory lock that disallows cleaning up cgroups.
# This function is not pure, but depends on state from the environment
-# (e.g. ${SLAVE_PID}) because we do not all possible values about when we
+# (e.g. ${AGENT_PID}) because we do not all possible values about when we
# register with 'atexit'.
function cleanup() {
# Make sure we kill the master on exit.
@@ -40,9 +40,9 @@ function cleanup() {
kill ${MASTER_PID}
fi
- # Make sure we kill the slave on exit.
- if [[ ! -z ${SLAVE_PID} ]]; then
- kill ${SLAVE_PID}
+ # Make sure we kill the agent on exit.
+ if [[ ! -z ${AGENT_PID} ]]; then
+ kill ${AGENT_PID}
fi
# Make sure we cleanup any cgroups we created on exiting.
@@ -63,7 +63,7 @@ atexit cleanup
export LD_LIBRARY_PATH=${MESOS_BUILD_DIR}/src/.libs
MASTER=${MESOS_SBIN_DIR}/mesos-master
-SLAVE=${MESOS_SBIN_DIR}/mesos-slave
+AGENT=${MESOS_SBIN_DIR}/mesos-agent
BALLOON_FRAMEWORK=${MESOS_HELPER_DIR}/balloon-framework
# The mesos binaries expect MESOS_ prefixed environment variables
@@ -94,20 +94,20 @@ if [[ ${STATUS} -ne 0 ]]; then
fi
-# Launch slave.
-${SLAVE} \
+# Launch agent.
+${AGENT} \
--work_dir=${MESOS_WORK_DIR} \
--master=127.0.0.1:5432 \
--isolation=cgroups/mem \
--cgroups_hierarchy=${TEST_CGROUP_HIERARCHY} \
--cgroups_root=${TEST_CGROUP_ROOT} \
--resources="cpus:1;mem:96" &
-SLAVE_PID=${!}
-echo "${GREEN}Launched slave at ${SLAVE_PID}${NORMAL}"
+AGENT_PID=${!}
+echo "${GREEN}Launched agent at ${AGENT_PID}${NORMAL}"
sleep 2
-# Check the slave is still running after 2 seconds.
-kill -0 ${SLAVE_PID} >/dev/null 2>&1
+# Check the agent is still running after 2 seconds.
+kill -0 ${AGENT_PID} >/dev/null 2>&1
STATUS=${?}
if [[ ${STATUS} -ne 0 ]]; then
echo "${RED}Slave crashed; failing test${NORMAL}"
@@ -124,8 +124,8 @@ if [[ ! ${STATUS} -eq 1 ]]; then
exit 1
fi
-# And make sure the slave is still running!
-kill -0 ${SLAVE_PID} >/dev/null 2>&1
+# And make sure the agent is still running!
+kill -0 ${AGENT_PID} >/dev/null 2>&1
STATUS=${?}
if [[ ${STATUS} -ne 0 ]]; then
echo "${RED}Slave crashed; failing test${NORMAL}"
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/support/generate-endpoint-help.py
----------------------------------------------------------------------
diff --git a/support/generate-endpoint-help.py b/support/generate-endpoint-help.py
index 5d23b10..70221fe 100755
--- a/support/generate-endpoint-help.py
+++ b/support/generate-endpoint-help.py
@@ -2,7 +2,7 @@
'''
Autogenerate documentation for all process endpoints spawned by a
-Mesos master and slave.
+Mesos master and agent.
'''
import argparse
@@ -38,7 +38,7 @@ MASTER_COMMAND = [
]
AGENT_COMMAND = [
- 'mesos-slave.sh',
+ 'mesos-agent.sh',
'--master=%s:%s' % (HOST_IP, MASTER_PORT)
]
@@ -157,7 +157,7 @@ def get_endpoint_path(id, name):
# Following the notion of a 'delegate' in Mesos, we want our
# preferred endpoint paths for the delegate process to be
# '/endpoint' instead of '/process/endpoint'. Since this script only
- # starts 1 master and 1 slave, our only delegate processes are
+ # starts 1 master and 1 agent, our only delegate processes are
# "master" and "slave(id)". If the id matches one of these, we don't
# prepend it, otherwise we do.
id = generalize_endpoint_id(id)
http://git-wip-us.apache.org/repos/asf/mesos/blob/c83d71c0/support/test-upgrade.py
----------------------------------------------------------------------
diff --git a/support/test-upgrade.py b/support/test-upgrade.py
index 2c4061d..4993200 100755
--- a/support/test-upgrade.py
+++ b/support/test-upgrade.py
@@ -47,7 +47,7 @@ class Process:
class Agent(Process):
def __init__(self, path, work_dir, credfile):
- Process.__init__(self, [os.path.join(path, 'bin', 'mesos-slave.sh'),
+ Process.__init__(self, [os.path.join(path, 'bin', 'mesos-agent.sh'),
'--master=127.0.0.1:5050',
'--credential=' + credfile,
'--work_dir=' + work_dir,
[2/2] mesos git commit: Rename the mesos-slave target to mesos-slave
in CMake.
Posted by vi...@apache.org.
Rename the mesos-slave target to mesos-slave in CMake.
Changed the libprocess CMake target to use 'mesos-agent' instead of
'mesos-slave'.
Review: https://reviews.apache.org/r/46134/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5cd32bf8
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5cd32bf8
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5cd32bf8
Branch: refs/heads/master
Commit: 5cd32bf8164953d87468e5a646a741789d52a1c9
Parents: c83d71c
Author: zhou xing <xi...@cn.ibm.com>
Authored: Thu Apr 14 18:50:57 2016 -0500
Committer: Vinod Kone <vi...@gmail.com>
Committed: Thu Apr 14 18:54:04 2016 -0500
----------------------------------------------------------------------
3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5cd32bf8/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index 7b53a49..ac75baf 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -131,5 +131,5 @@ include(ProcessConfigure)
# Define target for AGENT.
##########################
set(
- AGENT_TARGET mesos-slave
- CACHE STRING "Target we use to refer to slave executable")
+ AGENT_TARGET mesos-agent
+ CACHE STRING "Target we use to refer to agent executable")