From: Ernesto Puerta Date: Thu, 13 Aug 2020 11:45:17 +0000 (+0200) Subject: mgr/dashboard/api: reduce amount of daemon logs X-Git-Tag: v15.2.5~15^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2899437838b4064ce849da8fb39c41efc1b9f521;p=ceph.git mgr/dashboard/api: reduce amount of daemon logs Fixes: https://tracker.ceph.com/issues/46920 Signed-off-by: Ernesto Puerta (cherry picked from commit 88865cbfb101fcbb290fcb8151187e98a70fa3dd) Conflicts: qa/tasks/vstart_runner.py src/pybind/mgr/dashboard/run-backend-api-tests.sh - Bring opt_verbose and change number of dumped log lines to 1000 --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 587969b52d6..a7f976d8ea5 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -1300,6 +1300,7 @@ def exec_test(): global opt_log_ps_output opt_log_ps_output = False use_kernel_client = False + opt_verbose = True args = sys.argv[1:] flags = [a for a in args if a.startswith("-")] @@ -1321,6 +1322,8 @@ def exec_test(): clear_old_log() elif f == "--kclient": use_kernel_client = True + elif '--no-verbose' == f: + opt_verbose = False else: log.error("Unknown option '{0}'".format(f)) sys.exit(-1) @@ -1363,11 +1366,17 @@ def exec_test(): vstart_env["OSD"] = "4" vstart_env["MGR"] = max(max_required_mgr, 1).__str__() - args = [os.path.join(SRC_PREFIX, "vstart.sh"), "-n", "-d", - "--nolockdep"] + args = [ + os.path.join(SRC_PREFIX, "vstart.sh"), + "-n", + "--nolockdep", + ] if require_memstore: args.append("--memstore") + if opt_verbose: + args.append("-d") + # usually, i get vstart.sh running completely in less than 100 # seconds. remote.run(args=args, env=vstart_env, timeout=(3 * 60)) diff --git a/src/pybind/mgr/dashboard/run-backend-api-tests.sh b/src/pybind/mgr/dashboard/run-backend-api-tests.sh index 2fd61c57e91..5f7ba0645b0 100755 --- a/src/pybind/mgr/dashboard/run-backend-api-tests.sh +++ b/src/pybind/mgr/dashboard/run-backend-api-tests.sh @@ -68,7 +68,7 @@ on_tests_error() { if [[ -n "$JENKINS_HOME" ]]; then CEPH_OUT_DIR=${CEPH_OUT_DIR:-"$LOCAL_BUILD_DIR"/out} MGR_LOG_FILES=$(find "$CEPH_OUT_DIR" -iname "mgr.*.log" | tr '\n' ' ') - MGR_LOG_FILE_LAST_LINES=60000 + MGR_LOG_FILE_LAST_LINES=1000 for mgr_log_file in ${MGR_LOG_FILES[@]}; do printf "\n\nDisplaying last ${MGR_LOG_FILE_LAST_LINES} lines of: $mgr_log_file\n\n" tail -n ${MGR_LOG_FILE_LAST_LINES} $mgr_log_file @@ -117,7 +117,7 @@ run_teuthology_tests() { export COVERAGE_FILE=.coverage.mgr.dashboard find . -iname "*${COVERAGE_FILE}*" -type f -delete - python ../qa/tasks/vstart_runner.py --ignore-missing-binaries $OPTIONS $(echo $TEST_CASES) + python ../qa/tasks/vstart_runner.py --ignore-missing-binaries --no-verbose $OPTIONS $(echo $TEST_CASES) deactivate cd $CURR_DIR