You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2019/08/23 11:12:18 UTC

[mesos] branch master updated (9aabaf6 -> 978c760)

This is an automated email from the ASF dual-hosted git repository.

bbannier pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from 9aabaf6  Added MESOS-9836 to the 1.6.3 CHANGELOG.
     new 2fae620  Used `local` master in `ExampleTest.DiskFullFramework`.
     new 978c760  Sped up `ExampleTest.DiskFullFramework` test.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/tests/disk_full_framework_test.sh | 105 ++++++----------------------------
 1 file changed, 19 insertions(+), 86 deletions(-)


[mesos] 02/02: Sped up `ExampleTest.DiskFullFramework` test.

Posted by bb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 978c7609e7fd2a26fbefe2e4a3712a665cad5d70
Author: Benjamin Bannier <bb...@apache.org>
AuthorDate: Fri Aug 23 13:03:11 2019 +0200

    Sped up `ExampleTest.DiskFullFramework` test.
    
    This patch lowers the authentication timeout and increases the disk
    watch interval which can speed up the test by about 10s.
    
    Review: https://reviews.apache.org/r/71351/
---
 src/tests/disk_full_framework_test.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/tests/disk_full_framework_test.sh b/src/tests/disk_full_framework_test.sh
index 15b45aa..62e62cb 100755
--- a/src/tests/disk_full_framework_test.sh
+++ b/src/tests/disk_full_framework_test.sh
@@ -24,6 +24,11 @@ export MESOS_SYSTEMD_ENABLE_SUPPORT=false
 export MESOS_ISOLATION='disk/du'
 export MESOS_ENFORCE_CONTAINER_DISK_QUOTA=1
 export MESOS_RESOURCES="cpus:1;mem:96;disk:50"
+export MESOS_CONTAINER_DISK_WATCH_INTERVAL="100ms"
+
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
 
 # The main event!
 "${MESOS_HELPER_DIR}"/disk-full-framework \


[mesos] 01/02: Used `local` master in `ExampleTest.DiskFullFramework`.

Posted by bb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 2fae6203603060ff74b6ef0b39ac43b8132b76ce
Author: Benjamin Bannier <bb...@apache.org>
AuthorDate: Fri Aug 23 13:03:02 2019 +0200

    Used `local` master in `ExampleTest.DiskFullFramework`.
    
    This removes up to 4s runtime from the test as we do not have to wait
    for the master or agent to be up and running in the script.
    
    Review: https://reviews.apache.org/r/71350/
---
 src/tests/disk_full_framework_test.sh | 102 +++++-----------------------------
 1 file changed, 15 insertions(+), 87 deletions(-)

diff --git a/src/tests/disk_full_framework_test.sh b/src/tests/disk_full_framework_test.sh
index 83ae094..15b45aa 100755
--- a/src/tests/disk_full_framework_test.sh
+++ b/src/tests/disk_full_framework_test.sh
@@ -3,95 +3,31 @@
 # This script runs the disk full framework on a cluster using the disk/du
 # isolator and checks that the framework returns a status of 1.
 
-source ${MESOS_SOURCE_DIR}/support/colors.sh
-source ${MESOS_SOURCE_DIR}/support/atexit.sh
-source ${MESOS_HELPER_DIR}/colors.sh
-source ${MESOS_HELPER_DIR}/atexit.sh
+source "${MESOS_SOURCE_DIR}"/support/colors.sh
+source "${MESOS_SOURCE_DIR}"/support/atexit.sh
+source "${MESOS_HELPER_DIR}"/colors.sh
+source "${MESOS_HELPER_DIR}"/atexit.sh
 
-MASTER_PID=
-AGENT_PID=
-MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
-MESOS_RUNTIME_DIR=`mktemp -d -t mesos-XXXXXX`
+MESOS_WORK_DIR=$(mktemp -d -t mesos-XXXXXX)
+export MESOS_WORK_DIR
+atexit "rm -rf ${MESOS_WORK_DIR}"
 
-function cleanup() {
-  # Make sure we kill the master on exit.
-  if [[ ! -z ${MASTER_PID} ]]; then
-    kill ${MASTER_PID}
-  fi
-
-  # Make sure we kill the agent on exit.
-  if [[ ! -z ${AGENT_PID} ]]; then
-    kill ${AGENT_PID}
-  fi
-
-  if [[ -d "${MESOS_WORK_DIR}" ]]; then
-    rm -rf ${MESOS_WORK_DIR};
-  fi
-
-  if [[ -d "${MESOS_RUNTIME_DIR}" ]]; then
-    rm -rf ${MESOS_RUNTIME_DIR};
-  fi
-}
-
-atexit cleanup
-
-export LD_LIBRARY_PATH=${MESOS_BUILD_DIR}/src/.libs
-MASTER=${MESOS_SBIN_DIR}/mesos-master
-AGENT=${MESOS_SBIN_DIR}/mesos-agent
-DISK_FULL_FRAMEWORK=${MESOS_HELPER_DIR}/disk-full-framework
-
-# The mesos binaries expect MESOS_ prefixed environment variables
-# to correspond to flags, so we unset these here.
-unset MESOS_BUILD_DIR
-unset MESOS_SOURCE_DIR
-unset MESOS_HELPER_DIR
-unset MESOS_VERBOSE
-
-# Launch master.
-${MASTER} \
-    --ip=127.0.0.1 \
-    --port=5432 \
-    --work_dir=${MESOS_WORK_DIR} &
-MASTER_PID=${!}
-echo "${GREEN}Launched master at ${MASTER_PID}${NORMAL}"
-sleep 2
-
-# Check the master is still running after 2 seconds.
-kill -0 ${MASTER_PID} >/dev/null 2>&1
-STATUS=${?}
-if [[ ${STATUS} -ne 0 ]]; then
-  echo "${RED}Master crashed; failing test${NORMAL}"
-  exit 2
-fi
+MESOS_RUNTIME_DIR=$(mktemp -d -t mesos-XXXXXX)
+export MESOS_RUNTIME_DIR
+atexit "rm -rf ${MESOS_RUNTIME_DIR}"
 
 # Disable support for systemd as this test does not run as root.
 # This flag must be set as an environment variable because the flag
 # does not exist on non-Linux builds.
 export MESOS_SYSTEMD_ENABLE_SUPPORT=false
 
-# Launch agent.
-${AGENT} \
-    --work_dir=${MESOS_WORK_DIR} \
-    --runtime_dir=${MESOS_RUNTIME_DIR} \
-    --master=127.0.0.1:5432 \
-    --isolation='disk/du' \
-    --enforce_container_disk_quota \
-    --resources="cpus:1;mem:96;disk:50" &
-AGENT_PID=${!}
-echo "${GREEN}Launched agent at ${AGENT_PID}${NORMAL}"
-sleep 2
-
-# 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}"
-  exit 2
-fi
+export MESOS_ISOLATION='disk/du'
+export MESOS_ENFORCE_CONTAINER_DISK_QUOTA=1
+export MESOS_RESOURCES="cpus:1;mem:96;disk:50"
 
 # The main event!
-${DISK_FULL_FRAMEWORK} \
-    --master=127.0.0.1:5432 \
+"${MESOS_HELPER_DIR}"/disk-full-framework \
+    --master=local \
     --pre_sleep_duration=1secs \
     --post_sleep_duration=30secs \
     --disk_use_limit=10mb \
@@ -104,12 +40,4 @@ if [[ ! ${STATUS} -eq 1 ]]; then
   exit 1
 fi
 
-# 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}"
-  exit 2
-fi
-
 exit 0