mirror of
https://github.com/ceph/ceph
synced 2025-01-03 17:42:36 +00:00
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 <ridave@redhat.com>
This commit is contained in:
parent
842b5590aa
commit
1ef02b724d
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user