Commit Graph

118 Commits

Author SHA1 Message Date
Patrick Donnelly
285e1547de
qa: remove obsolete deactivate routines
This is handled automatically since Mimic.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-05-21 12:52:10 -07:00
Patrick Donnelly
4702be4f47
qa: test standby-replay with fs:workloads
Fixes: https://tracker.ceph.com/issues/50045
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-04-08 11:37:56 -07:00
Patrick Donnelly
5292e88201
qa: reduce dependence on teuthology role list for mds
It's not yet possible to completely remove the dependency on
mds_ids/mds_daemons in the CephFS tests but this commit reduces it
enough for most code paths to work with cephadm.

The main change here is use of CephManager.do_rados, with some
improvements.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-21 10:35:07 -07:00
Patrick Donnelly
8e45af05c9
qa: remove get_lone_mds_id
This helps remove a dependence on the list of mds_daemons from
teuthology/cephadm.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-21 10:35:07 -07:00
Patrick Donnelly
6ca48f6330
qa: use mds_tell for getting mds status
mds_asok is broken with cephadm currently due to [1].

[1] https://tracker.ceph.com/issues/48019#note-5

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-21 10:35:06 -07:00
Patrick Donnelly
4c3c69b230
qa: remove fallback for non-multifs ceph version
This code was for jewel (IIRC) or older.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-21 10:35:06 -07:00
Patrick Donnelly
eccf961697
qa: add Filesystem.reset helper
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-21 10:35:06 -07:00
Sebastian Wagner
340281fe76 qa/tasks: some type annotations
Mostly for making my IDE aware of things

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-03-10 15:02:41 +01:00
Patrick Donnelly
fe31c23964
Merge PR #39814 into master
* refs/pull/39814/head:
	qa/cephfs: move is_blocklisted() to filesystem.CephCluster

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-09 13:36:40 -08:00
Rishabh Dave
4d0f56fcc5 qa/cephfs: move is_blocklisted() to filesystem.CephCluster
Using self.fs.mon_manager in mount.py can lead to a crash since self.fs
can be None. Move is_blocklisted() to tasks.filesystem.CephCluster where
it can get access to mon_manager without depending on objects
representing Ceph FSs.

Fixes: https://tracker.ceph.com/issues/49511
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-06 09:11:36 +05:30
Patrick Donnelly
13c50a9923
Merge PR #38684 into master
* refs/pull/38684/head:
	qa: add _check_scrub_status helper to simplify the code
	qa: add run_scrub helper in filesystem class
	qa: add get_scrub_status helper in filesystem class
	qa: wait the scrub task to complete
	qa: remove passed_validation check for test_damage
	qa: move wait_until_scrub_complete helper to filesystem class
	mds: simplify the C_MDS_EnqueueScrub finish code

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-04 13:27:45 -08:00
Patrick Donnelly
780a1dd5ff
qa: add test for fs rm idempotency
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-12 07:24:33 -08:00
Patrick Donnelly
a59ecd3ed1
Merge PR #38640 into master
* refs/pull/38640/head:
	qa: add test for reserved keyword feature
	qa: use no client for required client feature tests
	mds: do not allow setting a reserved feature by name
	mds: return sv for efficiency

Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2021-01-11 10:12:17 -08:00
Xiubo Li
d3889cabc5 qa: add _check_scrub_status helper to simplify the code
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2021-01-09 15:32:22 +08:00
Xiubo Li
55d7db9ed6 qa: add run_scrub helper in filesystem class
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2021-01-09 14:56:09 +08:00
Xiubo Li
7f2483474a qa: add get_scrub_status helper in filesystem class
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2021-01-09 14:56:09 +08:00
Xiubo Li
b1f20a37c7 qa: move wait_until_scrub_complete helper to filesystem class
Fixes: https://tracker.ceph.com/issues/48559
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2021-01-09 14:56:09 +08:00
Patrick Donnelly
52ef68c681
Merge PR #38775 into master
* refs/pull/38775/head:
	qa: remove ceph file systems on completion

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2021-01-08 19:06:58 -08:00
Patrick Donnelly
b9c35d9d22
Merge PR #38664 into master
* refs/pull/38664/head:
	qa: bump scrub timeout
	qa: move cephfs_ec_profile under cephfs
	qa: do not use ec pools for default data pool
	qa: skip check-counters for light workloads
	qa: remove empty multimds suite
	qa: merge multimds:verify with fs:verify
	qa: merge multimds:thrash to fs:thrash
	qa: remove dead multimds:basic
	qa: move functional multimds tests to fs:functional
	qa: migrate multimds workloads to fs:workloads
	qa: only run valgrind on cephfs daemons
	qa: stop testing filestore on cephfs suites
	qa: load data pools before deleting fs

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Tested-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-08 11:25:23 -08:00
Patrick Donnelly
ea61b6a10f
Merge PR #38693 into master
* refs/pull/38693/head:
	qa: execute scrubs only on rank 0
	client: print debug information about resolved MDS
	qa: let Client::resolve_mds lookup the rank

Reviewed-by: Xiubo Li <xiubli@redhat.com>
2021-01-08 10:47:07 -08:00
Patrick Donnelly
abe7c86337
qa: remove ceph file systems on completion
So that we can avoid MDS replacement warnings.

Fixes: https://tracker.ceph.com/issues/48757
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-08 10:44:53 -08:00
Patrick Donnelly
f70228e35a
qa: add test for reserved keyword feature
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-08 08:27:38 -08:00
Patrick Donnelly
488f10c62f
qa: move cephfs_ec_profile under cephfs
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-07 12:55:25 -08:00
Patrick Donnelly
faa30050c1
qa: do not use ec pools for default data pool
This configuration unnecessarily slows down backtrace writes and bloats
the used disk space.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-07 12:55:25 -08:00
Patrick Donnelly
52059703bc
qa: load data pools before deleting fs
Otherwise current data pools at time of deletion may not be known.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-07 12:55:24 -08:00
Aashish Sharma
f5dd0195cd mgr/dashboard:minimize console log traces of Dashboard backend API tests
Changed log levels in some files to reduce console log traces

Fixes: https://tracker.ceph.com/issues/45822
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-12-23 11:32:43 +05:30
Patrick Donnelly
94d4a400cd
qa: let Client::resolve_mds lookup the rank
Who knew this magic already existed!

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-12-22 20:16:31 -08:00
Patrick Donnelly
4bd9ef0965
qa: update tests concerning setting of multifs
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-12-14 10:42:23 -08:00
Ramana Raja
7016a2001d qa/tasks: allow per file system config setting
Signed-off-by: Ramana Raja <rraja@redhat.com>
2020-11-20 13:23:21 +05:30
Xiubo Li
0422673b61 qa/cephfs: add session_timeout option support
When the mds revoking the Fwbl caps, the clients need to flush
the dirty data back to the OSDs, but the flush may make the OSDs
to be overloaded and slow, which may take more than 60 seconds to
finish. Then the MDS daemons will report the WRN messages.

For the teuthology test cases, let's just increase the timeout
value to make it work.

Fixes: https://tracker.ceph.com/issues/47565
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-10-23 14:27:37 +08:00
Xiubo Li
cb8081ce7f qa/cephfs: move the cephfs's opertions setting to create()
Fixes: https://tracker.ceph.com/issues/47565
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-10-23 14:27:37 +08:00
Venky Shankar
a95b364e3e test: add tests for validating MDS metrics via perf stats module
Fixes: http://tracker.ceph.com/issues/24285
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2020-10-12 07:34:51 -04:00
Venky Shankar
5afdf26943 test: Filesystem class helpers to grow and shrink MDS cluster
These routines were test specific. Make them a part of Filesystem
class.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2020-10-12 07:34:51 -04:00
Rishabh Dave
d7ec8d56aa qa/cephfs: don't pass args to destroy() in recreate()
In filesystem.py, don't set value of reset_obj_attrs to False.

Fixes: https://tracker.ceph.com/issues/47526
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-18 14:10:10 +05:30
Rishabh Dave
352a41d1b3 qa/cephfs: add tests for multi-FS auth tests
Add testsuite for testing authorization on Ceph cluster with multiple
file systems and enable it to be executable with Teuthology framework.

Also add helper methods required to setup the test environment for
multi-FS tests.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-11 18:02:48 +05:30
Rishabh Dave
04ed58fec2 qa/cephfs: modify delete_all_filesystems() in filesystem.py
Modify filesystem.Filesystem.delete_all_filesystems() method to make it
more succinct, move it to class MDSCluster instead and update every call
to it accordingly.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 23:56:59 +05:30
Rishabh Dave
a7eaec9e26 qa/cephfs: modify recreate() in filesystem.py
Modify cephfs.filesystem.Filesystem.recreate() method to delete only the
FS represented by the object instead of deleting the every FS on the
Ceph cluster.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Rishabh Dave
ee6e2297a1 qa/cephfs: add a method to destroy fs in filesystem.py
And reset_obj_attrs parameter to it so that the caller of the method can
choose to destroy the Ceph FS represented by the object without
disturbing the object attributes.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
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
Patrick Donnelly
683153c56e
qa: fix flake8 warnings
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:33 -07:00
Patrick Donnelly
aef549e49e
qa: add more ephemeral pin tests
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:32 -07:00
Patrick Donnelly
5eea6761cc
mds: trim pinned and empty subtrees
Before export (and ephemeral) pinned subtrees are stuck in cache
forever.

Add qa test for checking export pinned directories can be trimmed.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:31 -07:00
Patrick Donnelly
f451c43aca
qa: quietly print json output from asok commands
Pretty print output once. Use --format=json so the stdout on teuthology
is not pretty printed, taking hundreds of lines.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:29 -07:00
Kefu Chai
21ad5bf2eb qa/tasks/cephfs: flake8 fixes
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-24 10:12:11 +08:00
Michael Fritch
44bcee8d1a
qa/tasks: logger.warn() -> logger.warning()
logger.warn() is the same as logger.warning(), but was removed in py3.3

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-05-13 17:18:13 -06:00
Xiubo Li
dd4fc808a8 qa/tasks/cephfs: switch to StringIO to fix byte-like errors
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-25 06:21:55 -04:00
Xiubo Li
bf10478294 qa/tasks/vstart_runner: remove the stdin str type check
For the "ceph-dencoder" it will use the byte type data.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-25 06:21:54 -04:00
Xiubo Li
0631342d10 qa/tasks/cephfs/mount: switch to StringIO to fix TypeErrors
TypeError: cannot use a string pattern on a bytes-like object

Fixes: https://tracker.ceph.com/issues/45175
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-23 20:55:35 -04:00
Kefu Chai
20dafc6d52 qa/tasks/cephfs: allow caller to use BytesIO when calling rados()
when the caller expects binary data, it should pass BytesIO as stdout.

this change shold address the failure of
```
2020-04-05T12:47:25.335 INFO:tasks.cephfs_test_runner:======================================================================
2020-04-05T12:47:25.336 INFO:tasks.cephfs_test_runner:ERROR: test_apply_tag (tasks.cephfs.test_forward_scrub.TestForwardScrub)
2020-04-05T12:47:25.336 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-04-05T12:47:25.336 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2020-04-05T12:47:25.337 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_tchaikov_ceph_wip-qa-py3/qa/tasks/cephfs/test_forward_scrub.py", line 75, in test_apply_tag
2020-04-05T12:47:25.337 INFO:tasks.cephfs_test_runner:    self.assertTagged(inos[dirpath], tag, self.fs.get_metadata_pool_name())
2020-04-05T12:47:25.337 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_tchaikov_ceph_wip-qa-py3/qa/tasks/cephfs/test_forward_scrub.py", line 98, in assertTagged
2020-04-05T12:47:25.338 INFO:tasks.cephfs_test_runner:    "scrub_tag"
2020-04-05T12:47:25.338 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_tchaikov_ceph_wip-qa-py3/qa/tasks/cephfs/test_forward_scrub.py", line 35, in _read_str_xattr
2020-04-05T12:47:25.339 INFO:tasks.cephfs_test_runner:    strlen = struct.unpack('i', output[0:4])[0]
2020-04-05T12:47:25.339 INFO:tasks.cephfs_test_runner:TypeError: a bytes-like object is required, not 'str'
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:22 +08:00
Kefu Chai
eb2c6b3740 qa/tasks/cephfs: use BytesIO for capturing binary
this change partially reverts e46eb8348e0639ea162b7e224bca40e0257ad6ef.

xattrs could contain non-utf8 encoded data, and should be captured using
BytesIO. moreover, it will be fed to `ceph-dencoder`, which expects
binary when performing "import".

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:22 +08:00