Actions
Bug #47849
closedqa/vstart_runner: LocalRemote.run can't take multiple commands
% Done:
0%
Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
qa-suite
Labels (FS):
qa
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
v17.0.0-11959-gaaa3fb120a
Released In:
v18.2.0~2264
Upkeep Timestamp:
2025-07-14T19:26:53+00:00
Description
The issue is caused by this commit - https://github.com/ceph/ceph/pull/36457/commits/a177b470aa48a84e5346b310efa4fd626025dbfa.
2020-10-13 19:12:20,559.559 INFO:__main__:ERROR: test_cd_with_args (tasks.cephfs.test_cephfs_shell.TestCD) 2020-10-13 19:12:20,559.559 INFO:__main__:Test that when cd is issued with an argument, CWD is changed 2020-10-13 19:12:20,559.559 INFO:__main__:---------------------------------------------------------------------- 2020-10-13 19:12:20,559.559 INFO:__main__:Traceback (most recent call last): 2020-10-13 19:12:20,559.559 INFO:__main__: File "/home/rishabh/repos/ceph/test2/qa/tasks/cephfs/test_cephfs_shell.py", line 42, in setUp 2020-10-13 19:12:20,559.559 INFO:__main__: self.mount_a.client_remote.write_file(confpath, conf_contents, mode='777') 2020-10-13 19:12:20,560.560 INFO:__main__: File "../qa/tasks/vstart_runner.py", line 339, in write_file 2020-10-13 19:12:20,560.560 INFO:__main__: self.run(args=args, stdin=data, omit_sudo=omit_sudo) 2020-10-13 19:12:20,560.560 INFO:__main__: File "../qa/tasks/vstart_runner.py", line 394, in run 2020-10-13 19:12:20,560.560 INFO:__main__: return self._do_run(**kwargs) 2020-10-13 19:12:20,560.560 INFO:__main__: File "../qa/tasks/vstart_runner.py", line 462, in _do_run 2020-10-13 19:12:20,560.560 INFO:__main__: proc.wait() 2020-10-13 19:12:20,560.560 INFO:__main__: File "../qa/tasks/vstart_runner.py", line 208, in wait 2020-10-13 19:12:20,560.560 INFO:__main__: raise CommandFailedError(self.args, self.exitstatus) 2020-10-13 19:12:20,560.560 INFO:__main__:teuthology.exceptions.CommandFailedError: Command failed with status 1: ['dd', 'of=/tmp/tmp.wLwbpAP9uq', 'chmod', '777', '/tmp/tmp.wLwbpAP9uq'] 2020-10-13 19:12:20,560.560 INFO:__main__:
The issue is caused by following lines in vstart_runner.LocalRemote.write_file -
if mode:
chmod = 'sudo chmod' if sudo else 'chmod'
args += '\n' + chmod + ' ' + mode + ' ' + path
if owner:
chown = 'sudo chown' if sudo else 'chown'
args += '\n' + chown + ' ' + owner + ' ' + path
omit_sudo = False if sudo else True
self.run(args=args, stdin=data, omit_sudo=omit_sudo)
The issue can be reproduced by applying following patch -
$ git diff
diff --git a/qa/tasks/cephfs/test_cephfs_shell.py b/qa/tasks/cephfs/test_cephfs_shell.py
index 958a5b3118..9093245f17 100644
--- a/qa/tasks/cephfs/test_cephfs_shell.py
+++ b/qa/tasks/cephfs/test_cephfs_shell.py
@@ -39,7 +39,7 @@ class TestCephFSShell(CephFSTestCase):
conf_contents = "[cephfs-shell]\ncolors = False\ndebug = True\n"
confpath = self.mount_a.client_remote.sh('mktemp').strip()
- self.mount_a.client_remote.write_file(confpath, conf_contents)
+ self.mount_a.client_remote.write_file(confpath, conf_contents, mode='777')
self.default_shell_conf_path = confpath
def run_cephfs_shell_cmd(self, cmd, mount_x=None, shell_conf_path=None,
and by running python3 ../qa/tasks/vstart_runner.py tasks.cephfs.test_cephfs_shell.TestCD.test_cd_with_args.
Updated by Rishabh Dave over 5 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 37655
Updated by Venky Shankar almost 4 years ago
- Status changed from Fix Under Review to Resolved
Updated by Upkeep Bot 8 months ago
- Merge Commit set to aaa3fb120a0eb8ccfbfa9f35368ff3048f6e82d0
- Fixed In set to v17.0.0-11959-gaaa3fb120a
- Released In set to v18.2.0~2264
- Upkeep Timestamp set to 2025-07-14T19:26:53+00:00
Actions