From d96a7347d848ac00f418d9f79b197146313ad75c Mon Sep 17 00:00:00 2001 From: dparmar18 Date: Thu, 13 Oct 2022 16:22:06 +0530 Subject: [PATCH] qa: fix _run_mount_cmd() and _get_mount_cmd() args in vstart_runner commit https://github.com/ceph/ceph/commit/483b16062dc6c7a7c9b0110c17dc802227d560e9 brought in a new arg 'mntargs' and this resulted in errors like: 2022-10-13 01:57:37,519.519 INFO:__main__:ERROR: test_client_metrics_and_metadata (tasks.cephfs.test_mds_metrics.TestMDSMetrics) 2022-10-13 01:57:37,519.519 INFO:__main__:---------------------------------------------------------------------- 2022-10-13 01:57:37,519.519 INFO:__main__:Traceback (most recent call last): 2022-10-13 01:57:37,519.519 INFO:__main__: File "/home/dparmar/cephbuild_run_but_no_edits/ceph/qa/tasks/cephfs/test_mds_metrics.py", line 21, in setUp 2022-10-13 01:57:37,519.519 INFO:__main__: super(TestMDSMetrics, self).setUp() 2022-10-13 01:57:37,519.519 INFO:__main__: File "/home/dparmar/cephbuild_run_but_no_edits/ceph/qa/tasks/cephfs/cephfs_test_case.py", line 180, in setUp 2022-10-13 01:57:37,519.519 INFO:__main__: self.mounts[i].mount_wait() 2022-10-13 01:57:37,519.519 INFO:__main__: File "/home/dparmar/cephbuild_run_but_no_edits/ceph/qa/tasks/cephfs/mount.py", line 505, in mount_wait 2022-10-13 01:57:37,519.519 INFO:__main__: self.mount(**kwargs) 2022-10-13 01:57:37,519.519 INFO:__main__: File "/home/dparmar/cephbuild_run_but_no_edits/ceph/qa/tasks/cephfs/fuse_mount.py", line 52, in mount 2022-10-13 01:57:37,519.519 INFO:__main__: return self._mount(mntopts, mntargs, check_status) 2022-10-13 01:57:37,519.519 INFO:__main__: File "/home/dparmar/cephbuild_run_but_no_edits/ceph/qa/tasks/cephfs/fuse_mount.py", line 68, in _mount 2022-10-13 01:57:37,519.519 INFO:__main__: retval = self._run_mount_cmd(mntopts, mntargs, check_status) 2022-10-13 01:57:37,519.519 INFO:__main__:TypeError: LocalFuseMount._run_mount_cmd() takes 3 positional arguments but 4 were given This new arg needs to be added in vstart_runner to prevent this. Introduced-By: https://github.com/ceph/ceph/commit/483b16062dc6c7a7c9b0110c17dc802227d560e9 Fixes: https://tracker.ceph.com/issues/58088 Signed-off-by: Dhairya Parmar --- qa/tasks/vstart_runner.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 1a8902079ae46..3e91ff2c0a7c0 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -705,18 +705,18 @@ def __init__(self, ctx, test_dir, client_id, client_keyring_path=None, def _create_mntpt(self): self.client_remote.run(args=f'mkdir -p -v {self.hostfs_mntpt}') - def _run_mount_cmd(self, mntopts, check_status): - retval = super(type(self), self)._run_mount_cmd(mntopts, check_status) + def _run_mount_cmd(self, mntopts, mntargs, check_status): + retval = super(type(self), self)._run_mount_cmd(mntopts, mntargs, + check_status) if retval is None: # None represents success self._set_fuse_daemon_pid(check_status) return retval - def _get_mount_cmd(self, mntopts): - mount_cmd = super(type(self), self)._get_mount_cmd(mntopts) + def _get_mount_cmd(self, mntopts, mntargs): + mount_cmd = super(type(self), self)._get_mount_cmd(mntopts, mntargs) if os.getuid() != 0: mount_cmd += ['--client_die_on_failed_dentry_invalidate=false'] - return mount_cmd @property