]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard/api: reduce amount of daemon logs 36692/head
authorErnesto Puerta <epuertat@redhat.com>
Thu, 13 Aug 2020 11:45:17 +0000 (13:45 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Mon, 17 Aug 2020 16:43:17 +0000 (18:43 +0200)
Fixes: https://tracker.ceph.com/issues/46920
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit 88865cbfb101fcbb290fcb8151187e98a70fa3dd)

Conflicts:
qa/tasks/vstart_runner.py
src/pybind/mgr/dashboard/run-backend-api-tests.sh
        - Bring opt_verbose option and only dump last 1000 lines of logs

qa/tasks/vstart_runner.py
src/pybind/mgr/dashboard/run-backend-api-tests.sh

index 315ab84460e629890dd61a438a6b4ec4dad516f1..9e9b205eba4ac67423ab3ce04cb1178624dac456 100644 (file)
@@ -902,6 +902,7 @@ def exec_test():
     create_cluster = False
     create_cluster_only = False
     ignore_missing_binaries = False
+    opt_verbose = True
 
     args = sys.argv[1:]
     flags = [a for a in args if a.startswith("-")]
@@ -915,6 +916,8 @@ def exec_test():
             create_cluster_only = True
         elif f == "--ignore-missing-binaries":
             ignore_missing_binaries = True
+        elif '--no-verbose' == f:
+            opt_verbose = False
         else:
             log.error("Unknown option '{0}'".format(f))
             sys.exit(-1)
@@ -958,11 +961,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")
+
         remote.run(args, env=vstart_env)
 
         # Wait for OSD to come up so that subsequent injectargs etc will
index 040a7e0afa9757156111f0ea4b7eedba79ee100e..668313991d0860d501e41d2f983f3313971ad3ff 100755 (executable)
@@ -71,7 +71,7 @@ on_tests_error() {
     if [[ -n "$JENKINS_HOME" ]]; then
         CEPH_OUT_DIR=${CEPH_OUT_DIR:-"$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
@@ -120,7 +120,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 $TEST_CASES
+    python ../qa/tasks/vstart_runner.py --ignore-missing-binaries --no-verbose $OPTIONS $TEST_CASES
 
     deactivate
     cd $CURR_DIR