Skip to content

vstart_runner: make "shell" as default argument#38443

Merged
batrick merged 2 commits intoceph:masterfrom
rishabh-d-dave:vr-set-shell-to-True
Mar 23, 2021
Merged

vstart_runner: make "shell" as default argument#38443
batrick merged 2 commits intoceph:masterfrom
rishabh-d-dave:vr-set-shell-to-True

Conversation

@rishabh-d-dave
Copy link
Contributor

And set its default value to True since methods like
LocalRemote.write_file() pass bash's built-in commands.

Also, update the part where LocalRemote._do_run() sets shell to True
based on whether or not list contains an instance of class Raw.

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@rishabh-d-dave rishabh-d-dave requested review from a team and removed request for a team December 4, 2020 11:55
@rishabh-d-dave
Copy link
Contributor Author

Odd, never requested review from api group.

@rishabh-d-dave rishabh-d-dave force-pushed the vr-set-shell-to-True branch 2 times, most recently from 23660a2 to ff51c81 Compare December 4, 2020 17:12
@rishabh-d-dave
Copy link
Contributor Author

jenkins test make check

@rishabh-d-dave
Copy link
Contributor Author

Since moving the commit that sets shell to True from PR #37655 and PR #37667 to this PR, the Ceph API tests for PR #37655 and #37667 now run successfully and the same tests fails consistently for this PR. Therefore, the issue was certainly caused by this commit.

@rishabh-d-dave
Copy link
Contributor Author

The PR branch update contains the fix for the issue reported here - #38443 (comment).

@rishabh-d-dave rishabh-d-dave force-pushed the vr-set-shell-to-True branch 2 times, most recently from 0651ef1 to 73e411e Compare January 11, 2021 04:50
@rishabh-d-dave rishabh-d-dave requested review from a team, batrick and lxbsz February 25, 2021 06:31
@rishabh-d-dave
Copy link
Contributor Author

@batrick ping.

Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

@rishabh-d-dave
Copy link
Contributor Author

About the PR branch update: Testing an enhancement with the new commit.

@rishabh-d-dave
Copy link
Contributor Author

rishabh-d-dave commented Mar 8, 2021

Details about last update: #38443 (comment).

@rishabh-d-dave rishabh-d-dave requested a review from batrick March 8, 2021 09:14
@rishabh-d-dave
Copy link
Contributor Author

@rishabh-d-dave
Copy link
Contributor Author

@batrick This PR is ready for review and locally it runs fine.

Also, changes to vstart_runner.py have been tested but I am confused if this PR requires more testing since it makes some modifications to qa/tasks/ceph_manager.py and qa/tasks/ceph_test_case.py but in effect those changes lead to nothing different than master.

@rishabh-d-dave
Copy link
Contributor Author

@batrick run_ceph_w() is not called anywhere in qa/ except for in assert_cluster_log() which is being called in test_sessionmap, test_forward_scrub and test_mantle. Of these, I ran first 2 (which ran successfully) and I couldn't figure out how to run the last one. Outside qa/tasks/cephfs tests, assert_cluster_log() is called via LocalCephCluster.run_ceph_w() in qa/tasks/mgr tests which already passed on ceph API CI job.

$ grep -rnI run_ceph_w qa/
qa/tasks/ceph_test_case.py:109:                self.watcher_process = ceph_manager.run_ceph_w(watch_channel)
qa/tasks/ceph_manager.py:1439:    def run_ceph_w(self, watch_channel=None):
qa/tasks/vstart_runner.py:787:    def run_ceph_w(self, watch_channel=None):
$ grep -rnI assert_cluster_log qa/
qa/tasks/ceph_test_case.py:85:    def assert_cluster_log(self, expected_pattern, invert_match=False,
qa/tasks/mgr/test_module_selftest.py:238:            with self.assert_cluster_log(log_message):
qa/tasks/mgr/test_module_selftest.py:242:            with self.assert_cluster_log(log_message, watch_channel="audit"):
qa/tasks/cephfs/test_forward_scrub.py:236:        with self.assert_cluster_log("inode table repaired", invert_match=True):
qa/tasks/cephfs/test_forward_scrub.py:261:        with self.assert_cluster_log("inode table repaired"):
qa/tasks/cephfs/test_forward_scrub.py:294:        with self.assert_cluster_log("bad backtrace on inode"):
qa/tasks/cephfs/test_sessionmap.py:186:        with self.assert_cluster_log("client session with non-allowable root '/baz' denied"):
qa/tasks/cephfs/test_mantle.py:25:        with self.assert_cluster_log(failure + obj + " " + expect):
qa/tasks/cephfs/test_mantle.py:36:        with self.assert_cluster_log(failure + " " + expect): pass
qa/tasks/cephfs/test_mantle.py:42:        with self.assert_cluster_log(expect): pass
qa/tasks/cephfs/test_mantle.py:62:        with self.assert_cluster_log(success + "valid.lua"):
qa/tasks/cephfs/test_mantle.py:104:        with self.assert_cluster_log(failure + "valid.lua" + expect, timeout=30):

So, except for test_mantle, everything is covered.

Add "shell" as a parameter for LocalRemoteProcess._do_run() and set its
default value to True. This is necessary to align the interface that
executes the commands for the teuthology and for vstart_runner.py which
reduces compatibility bugs between vstart_runner and teuthology for
tests.

Also, update the part where LocalRemote._do_run() sets shell to True
based on whether or not list contains an instance of class Raw.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
Setting shell to True in call to run() in LocalCephManager.run_ceph_w()
leads to a crash when self.subproc.communicate() is executed for the
process created by running "ceph -w".

Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave rishabh-d-dave removed the wip-rishabh-testing Rishabh's testing label label Mar 17, 2021
batrick added a commit to batrick/ceph that referenced this pull request Mar 18, 2021
* refs/pull/38443/head:
	qa: set "shell" to False for run_ceph_w()
	vstart_runner: make "shell" a default argument
@batrick
Copy link
Member

batrick commented Mar 23, 2021

https://pulpito.ceph.com/pdonnell-2021-03-18_13:46:31-fs-wip-pdonnell-testing-20210318.024145-distro-basic-smithi/

@batrick batrick merged commit 42270a5 into ceph:master Mar 23, 2021
@rishabh-d-dave rishabh-d-dave deleted the vr-set-shell-to-True branch March 23, 2021 03:47
@batrick
Copy link
Member

batrick commented Apr 6, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants