From b5e3428fcb6b979289621ea5e16778be234b502b Mon Sep 17 00:00:00 2001 From: TommyLike Date: Mon, 6 May 2019 15:53:43 +0800 Subject: [PATCH 1/2] Fix log issue --- .travis.yml | 6 +++--- hack/run-e2e-kind.sh | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 323510fd61..0de14215c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,6 @@ jobs: - make e2e-test-kind after_failure: # Echo logs and upload - - test -f volcano-admission.log && echo "******<>******" && cat volcano-admission.log - - test -f volcano-controller.log && echo "******<>******" && cat volcano-controller.log - - test -f volcano-scheduler.log && echo "******<>******" && cat volcano-scheduler.log + - test -f volcano-admission.log && echo "************<>*****Max line limited*****" && cat volcano-admission.log + - test -f volcano-controller.log && echo "************<>*****Max line limited*****" && cat volcano-controller.log + - test -f volcano-scheduler.log && echo "************<>*****Max line limited*****" && cat volcano-scheduler.log diff --git a/hack/run-e2e-kind.sh b/hack/run-e2e-kind.sh index c68467398c..5d03dd19ff 100755 --- a/hack/run-e2e-kind.sh +++ b/hack/run-e2e-kind.sh @@ -3,6 +3,7 @@ export VK_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.. export VK_BIN=${VK_ROOT}/${BIN_DIR}/${BIN_OSARCH} export LOG_LEVEL=3 +export MAX_LOGLINE=10000 export SHOW_VOLCANO_LOGS=${SHOW_VOLCANO_LOGS:-1} export CLEANUP_CLUSTER=${CLEANUP_CLUSTER:-1} export MPI_EXAMPLE_IMAGE=${MPI_EXAMPLE_IMAGE:-"volcanosh/example-mpi:0.0.1"} @@ -76,9 +77,9 @@ function uninstall-volcano { function generate-log { echo "Generating volcano log files" - kubectl logs -lapp=volcano-admission -n kube-system > volcano-admission.log - kubectl logs -lapp=volcano-controller -n kube-system > volcano-controller.log - kubectl logs -lapp=volcano-scheduler -n kube-system > volcano-scheduler.log + kubectl logs -lapp=volcano-admission -n kube-system --tail=${MAX_LOGLINE} > volcano-admission.log + kubectl logs -lapp=volcano-controller -n kube-system --tail=${MAX_LOGLINE} > volcano-controller.log + kubectl logs -lapp=volcano-scheduler -n kube-system --tail=${MAX_LOGLINE} > volcano-scheduler.log } # clean up From ae35af8e2fe3ee24b3f2042dbff495dba29218e8 Mon Sep 17 00:00:00 2001 From: TommyLike Date: Tue, 7 May 2019 10:27:58 +0800 Subject: [PATCH 2/2] Remove max line size limit --- .travis.yml | 6 +++--- hack/run-e2e-kind.sh | 15 +++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0de14215c9..323510fd61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,6 @@ jobs: - make e2e-test-kind after_failure: # Echo logs and upload - - test -f volcano-admission.log && echo "************<>*****Max line limited*****" && cat volcano-admission.log - - test -f volcano-controller.log && echo "************<>*****Max line limited*****" && cat volcano-controller.log - - test -f volcano-scheduler.log && echo "************<>*****Max line limited*****" && cat volcano-scheduler.log + - test -f volcano-admission.log && echo "******<>******" && cat volcano-admission.log + - test -f volcano-controller.log && echo "******<>******" && cat volcano-controller.log + - test -f volcano-scheduler.log && echo "******<>******" && cat volcano-scheduler.log diff --git a/hack/run-e2e-kind.sh b/hack/run-e2e-kind.sh index 5d03dd19ff..a9e37d658d 100755 --- a/hack/run-e2e-kind.sh +++ b/hack/run-e2e-kind.sh @@ -3,17 +3,16 @@ export VK_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.. export VK_BIN=${VK_ROOT}/${BIN_DIR}/${BIN_OSARCH} export LOG_LEVEL=3 -export MAX_LOGLINE=10000 export SHOW_VOLCANO_LOGS=${SHOW_VOLCANO_LOGS:-1} export CLEANUP_CLUSTER=${CLEANUP_CLUSTER:-1} export MPI_EXAMPLE_IMAGE=${MPI_EXAMPLE_IMAGE:-"volcanosh/example-mpi:0.0.1"} -if [[ "${CLUSTER_NAME}xxx" != "xxx" ]];then - export CLUSTER_CONTEXT="--name ${CLUSTER_NAME}" -else - export CLUSTER_CONTEXT="--name integration" +if [[ "${CLUSTER_NAME}xxx" == "xxx" ]];then + CLUSTER_NAME="integration" fi +export CLUSTER_CONTEXT="--name ${CLUSTER_NAME}" + export KIND_OPT=${KIND_OPT:=" --config ${VK_ROOT}/hack/e2e-kind-config.yaml"} # check if kind installed @@ -77,9 +76,9 @@ function uninstall-volcano { function generate-log { echo "Generating volcano log files" - kubectl logs -lapp=volcano-admission -n kube-system --tail=${MAX_LOGLINE} > volcano-admission.log - kubectl logs -lapp=volcano-controller -n kube-system --tail=${MAX_LOGLINE} > volcano-controller.log - kubectl logs -lapp=volcano-scheduler -n kube-system --tail=${MAX_LOGLINE} > volcano-scheduler.log + kubectl logs deployment/${CLUSTER_NAME}-admission -n kube-system > volcano-admission.log + kubectl logs deployment/${CLUSTER_NAME}-controllers -n kube-system > volcano-controller.log + kubectl logs deployment/${CLUSTER_NAME}-scheduler -n kube-system > volcano-scheduler.log } # clean up