From b5e3428fcb6b979289621ea5e16778be234b502b Mon Sep 17 00:00:00 2001 From: TommyLike Date: Mon, 6 May 2019 15:53:43 +0800 Subject: [PATCH] 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