From: Rishabh Dave Date: Sat, 17 Aug 2019 07:42:38 +0000 (+0530) Subject: qa/vstart_runner.py: make printing of stdout of ps optional X-Git-Tag: v15.1.0~1410^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1ef02b724d958d5ab8ef11e4ead43125f3086c1b;p=ceph-ci.git qa/vstart_runner.py: make printing of stdout of ps optional stdout of ps command is generally pretty huge which makes it harder to interpret logs. Don't print it by default and add "--log-ps-output" to enable printing it. Signed-off-by: Rishabh Dave --- diff --git a/doc/dev/developer_guide/index.rst b/doc/dev/developer_guide/index.rst index e799801873c..8e2af11c045 100644 --- a/doc/dev/developer_guide/index.rst +++ b/doc/dev/developer_guide/index.rst @@ -1636,6 +1636,7 @@ vstart_runner.py can take 3 options - --create-cluster-only creates the cluster and quits; tests can be issued later --interactive drops a Python shell when a test fails +--log-ps-output logs ps output; might be useful while debugging --teardown tears Ceph cluster down after test(s) has finished runnng diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 63f37bd7d20..fcc09ad8fee 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -390,10 +390,13 @@ class LocalDaemon(object): if line.find("ceph-{0} -i {1}".format(self.daemon_type, self.daemon_id)) != -1: log.info("Found ps line for daemon: {0}".format(line)) return int(line.split()[0]) - log.info("No match for {0} {1}: {2}".format( - self.daemon_type, self.daemon_id, ps_txt - )) - return None + if log_ps_output: + log.info("No match for {0} {1}: {2}".format( + self.daemon_type, self.daemon_id, ps_txt)) + else: + log.info("No match for {0} {1}".format(self.daemon_type, + self.daemon_id)) + return None def wait(self, timeout): waited = 0 @@ -999,6 +1002,8 @@ def exec_test(): create_cluster_only = False ignore_missing_binaries = False teardown_cluster = False + global log_ps_output + log_ps_output = False args = sys.argv[1:] flags = [a for a in args if a.startswith("-")] @@ -1014,6 +1019,8 @@ def exec_test(): ignore_missing_binaries = True elif f == '--teardown': teardown_cluster = True + elif f == '--log-ps-output': + log_ps_output = True else: log.error("Unknown option '{0}'".format(f)) sys.exit(-1)