Project

General

Profile

Bug #45815

vstart_runner.py: set stdout and stderr to None by default

Added by Rishabh Dave 4 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
qa-suite
Labels (FS):
qa
Pull request ID:
Crash signature:

Description

Right now both are set to BytesIO() in LocalRemoteProcess.__init__() when values are not passed. See - https://github.com/ceph/ceph/blame/master/qa/tasks/vstart_runner.py#L165. Here's the code -

class LocalRemoteProcess(object):
    def __init__(self, args, subproc, check_status, stdout, stderr):
        self.args = args
        self.subproc = subproc
        self.stdout = stdout or BytesIO()
        self.stderr = stderr or BytesIO()

However, teuthology doesn't do that which leads to the case where tests passes with vstart_runner.py but fails with teuthology. Here's one such casse - http://qa-proxy.ceph.com/teuthology/rishabh-2020-06-01_06:51:22-fs-wip-rishabh-fs-test_cephfs_shell-fix-distro-basic-smithi/5109832/teuthology.log. Following is traceback from the log -

2020-06-01T14:10:57.731 INFO:tasks.cephfs_test_runner:======================================================================
2020-06-01T14:10:57.731 INFO:tasks.cephfs_test_runner:ERROR: test_df_for_invalid_directory (tasks.cephfs.test_cephfs_shell.TestDF)
2020-06-01T14:10:57.731 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-06-01T14:10:57.732 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2020-06-01T14:10:57.732 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-rishabh-fs-test_cephfs_shell-fix/qa/tasks/cephfs/test_cephfs_shell.py", line 747, in test_df_for_invalid_directory
2020-06-01T14:10:57.732 INFO:tasks.cephfs_test_runner:    proc = self.run_cephfs_shell_cmd('df ' + dir_abspath)
2020-06-01T14:10:57.732 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-rishabh-fs-test_cephfs_shell-fix/qa/tasks/cephfs/test_cephfs_shell.py", line 46, in run_cephfs_shell_cmd
2020-06-01T14:10:57.733 INFO:tasks.cephfs_test_runner:    confpath = mount_x.client_remote.run(args=['mktemp']).stdou

Here's the code from the PR to the test of which above log snippet belongs -

        if not shell_conf_path:
            conf_contents = "[cephfs-shell]\ncolors = False\ndebug = True\n" 
            confpath = mount_x.client_remote.run(args=['mktemp']).stdout.\
                getvalue().decode().strip()
            sudo_write_file(mount_x.client_remote, confpath, conf_contents)
            shell_conf_path = confpath

PR - https://github.com/ceph/ceph/pull/32111

History

#1 Updated by Rishabh Dave 4 months ago

  • Pull request ID set to 35522

#2 Updated by Rishabh Dave 4 months ago

  • Status changed from In Progress to Fix Under Review

#3 Updated by Patrick Donnelly 3 months ago

  • Target version set to v16.0.0
  • Source set to Development

#4 Updated by Patrick Donnelly 3 months ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF