Commit Graph

39 Commits

Author SHA1 Message Date
Patrick Donnelly
483b16062d
qa: add new mntargs option for fuse
test_client_recovery was also using mntopts to specify additional
options to ceph-fuse. Because the two prior commits unify the behavior
of ceph-fuse and the kernel mount so that the "-o" option is available
for both, that changes breaks this test. Add a special set of args
available only for fuse (there is no equivalent on the kernel).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-26 22:19:29 -04:00
Xiubo Li
dc5e3b2622 qa: correct the parameters' order
The parameters' order is incorrect and missing the client_config.

Introduced-by: 242585656c
Fixes: https://tracker.ceph.com/issues/53216
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2021-12-01 15:06:06 +08:00
Jeff Layton
242585656c qa: test that new mounts of same fs function after old mount is evicted
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2021-10-20 10:34:01 -04:00
Jeff Layton
5ab91d53a1 qa: remove REQUIRE_KCLIENT_REMOTE
Nothing references this variable anymore since commit 2df7caae4b (qa:
remove obsolete test).

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2021-10-19 11:07:09 -04:00
Rishabh Dave
485841b255 qa: import CommandFailedError from exceptions not run
Stop importing CommandFailedError from teuthology.orchestra.run, it is
actually defined in teuthology.exception.

Fixes: https://tracker.ceph.com/issues/51226
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-10-05 23:41:09 +05:30
Patrick Donnelly
f987914e65
Merge PR #42081 into master
* refs/pull/42081/head:
	qa: use kclient xattr to lookup client id
	qa: refactor reading debug file code
	qa: get mount id before failing fs

Reviewed-by: Xiubo Li <xiubli@redhat.com>
2021-07-02 13:17:05 -07:00
Patrick Donnelly
e2b39f6c8c
qa: avoid using sudo for regular test artifacts
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-01 10:56:10 -07:00
Patrick Donnelly
4fc4ccb7a1
qa: convert mount calls to mount_wait
These tests want to immediately use the mount anyway. But the main
problem is, without waiting for the mount to complete, the command:

    chmod 1777 /path/to/mount

is not run so the mount cannot be written to by normal users without
sudo.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-01 10:56:10 -07:00
Patrick Donnelly
97a86453f8
qa: get mount id before failing fs
Otherwise getxattr will hang.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-06-29 20:13:29 -07:00
Patrick Donnelly
0825d6aa9e
qa: simplify tests which stop MDS ranks
Instead of stopping MDS daemons and individually failing MDS daemons,
just fail the ranks or the entire file system, where possible.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-21 10:35:06 -07:00
Xiubo Li
7acd445fcc qa/tasks: tear down the background process before unmounting
If the background process keeps running by opening the mountpoint
directory, the unmount will fail with BUSY.

Fixes: https://tracker.ceph.com/issues/46883
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-10-21 04:02:38 -04:00
Xiubo Li
def177ff3b qa/tasks: switch to _kill_background() helper to terminate the daemons
Fixes: https://tracker.ceph.com/issues/46883
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-10-21 04:01:35 -04:00
Rishabh Dave
07e493ffb5 qa/cephfs: allow reusing mount objects and add remount method
This commit introduces following two set of changes -

First, make client keyring path, mountpoint on host FS and CephFS and
CephFS's name attributes of the object representing the mount
and update all the mount object creation calls accordingly. Also,
rewrite all the mount object creation to use keyword arguments instead
of positional arguments to avoid mistakes, especially since a new
argument was added in this commit.

Second, add remount method to mount.py so that it's possible to unmount
safely, modify the attributes of the object representing the mount and
mount again based on new state of the object *in a single call*. The
method is placed in mount.py to avoid duplication.

This change has two leads to two more changes: upgrading interface of
mount() and mount_wait() and upgrading testsuites to adapt to these
change.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Sage Weil
dfd01d7653 blacklist -> blocklist
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Neha Ojha <nojha@redhat.com>
2020-08-24 19:53:08 +00:00
Xiubo Li
5c24d91327 qa/tasks/cephfs: add mount_wait() support to simplify the code
Mostly we should wait the mountpoint to get ready, especially for
the fuse mountpoint, sometimes it may take a few seconds to get
ready.

Fixes: https://tracker.ceph.com/issues/44044
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-14 07:47:04 -04:00
Xiubo Li
eb2fe8440b qa/tasks/cephfs/test_client_recovery: switch to netns suspend/resume
Fixes: https://tracker.ceph.com/issues/44044
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-14 07:47:03 -04:00
Kefu Chai
2089bf04b9 qa/tasks: use "a // b" instead of "a / b"
for expressions where the value is expected to be integer. as in
python3, `a / b` returns a float.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 20:33:47 +08:00
Yan, Zheng
107b91d528 qa/cephfs: test case for auto reconnect after blacklisted
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: https://tracker.ceph.com/issues/42085
2020-03-30 10:24:47 +08:00
Yan, Zheng
261a456439 qa/cephfs: test case for auto reconnect after blacklisted
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: https://tracker.ceph.com/issues/42085
2020-01-15 15:43:17 +08:00
Thomas Bechtold
bdcc94a1d1 qa: Run flake8 on python2 and python3
To be able to catch problems with python2 *and* python3, run flake8
with both versions. From the flake8 homepage:

It is very important to install Flake8 on the correct version of
Python for your needs. If you want Flake8 to properly parse new
language features in Python 3.5 (for example), you need it to be
installed on 3.5 for Flake8 to understand those features. In many
ways, Flake8 is tied to the version of Python on which it runs.

Also fix the problems with python3 on the way.
Note: This requires now the six module for teuthology. But this is
already an install_require in teuthology itself.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-13 09:24:20 +01:00
Thomas Bechtold
0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00
Venky Shankar
dcbdc726a6 qa: allow client mount to reset fully
... without this there is a sutle race where it takes a
bit of time after a hard reset of a client mount causing
further checks to fail as the (still up) client is still
connected to the MDS.

Fixes: http://tracker.ceph.com/issues/42213
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-10-21 08:38:37 -04:00
Kyr Shatskyy
7e87f80a87 tests: use python3 compatible print
Fixes: https://tracker.ceph.com/issues/42210
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-11 19:02:04 +02:00
Patrick Donnelly
9e106f1422
Merge PR #29104 into master
* refs/pull/29104/head:
	qa/cephfs: test case for timeout config of individual session
	mds: add command that config individual client session

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-07-31 12:06:39 -07:00
Patrick Donnelly
602e5f6eb4
qa: sleep briefly after resetting kclient
Continuation of 6b83f43ba0.

Fixes: https://tracker.ceph.com/issues/40999
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-07-29 14:08:17 -07:00
Yan, Zheng
4b28a4a756 qa/cephfs: test case for timeout config of individual session
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-07-29 14:42:41 +08:00
Patrick Donnelly
6b83f43ba0
qa: wait for kernel client death
After sending the reboot command, we need to wait briefly for it to be
rebooted so that the kernel client doesn't voluntarily give up its Fb
cap.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-07-26 15:34:17 -07:00
Rishabh Dave
80152465b5 qa/tests: test if unresponsive MDS client with no caps is evicted directly
Test if an unresponsive MDS client session holding no caps is evicted
directly at session_autoclose without being marked as stale at
session_timeout.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-07-20 09:04:50 +05:30
Yan, Zheng
1c8be588e3 qa/cephfs: update tests for stale session handling
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-06-08 21:15:14 +08:00
Patrick Donnelly
1071f73c76
qa: use skipTest method instead of exception
This is the recommended method to skip a test according to [1]. It also lets us
avoid an unnecessary import.

[1] https://docs.python.org/2/library/unittest.html#unittest.TestCase.skipTest

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-04-24 09:38:52 -07:00
Yan, Zheng
eb51786beb qa/tasks/cephfs: add test for ceph_abort_conn()
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2018-06-28 16:16:50 +08:00
Yan, Zheng
5688476513 qa/tasks/cephfs: add test for renewing stale session
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2018-05-03 10:50:28 +08:00
Rishabh Dave
b14302d1fe qa/cephfs: test if evicted client unmounts without hanging
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2018-04-30 12:02:56 +00:00
Patrick Donnelly
67ca6cd229
mds: obsolete MDSMap option configs
These configs were used for initialization but it is more appropriate to
require setting these file system attributes via `ceph fs set`. This is similar
to what was already done with max_mds. There are new variables added for `fs
set` where missing.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-12-13 18:30:52 -08:00
Yan, Zheng
98d86a0752 qa/cephfs: kill mount if it gets evicted by mds
otherwise, teardown() hange at umount

Fixes: http://tracker.ceph.com/issues/21275
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-09-13 21:30:51 +08:00
John Spray
f80e0973f5 Merge pull request #15062 from ukernel/wip-19912
qa/tasks/cephfs: use getattr to guarantee inode is in client cache

Reviewed-by: John Spray <john.spray@redhat.com>
2017-05-25 18:44:54 +01:00
John Spray
47a9c9ba67 qa: add test_filelock_eviction
To check that eviction is releasing flocks.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-05-23 05:22:17 -04:00
Yan, Zheng
1a48359f34 qa/tasks/cephfs: use getattr to guarantee inode is in client cache
When selinux is enabled, kernel client may releases inodes (without
uptodate xattr) in readdir reply immediately after processing the reply.
The reason is that linking the inode to dentry causes deadlock if xattr
is not uptodate.

We can use stat(2) syscall to guarantee that kernel client caches an
inode.

Fixes: http://tracker.ceph.com/issues/19912
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-05-12 16:42:25 +08:00
Sage Weil
c01f2ee0e2 move ceph-qa-suite dirs into qa/ 2016-12-14 11:29:55 -06:00