Commit Graph

30 Commits

Author SHA1 Message Date
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
1c40ee32f9
qa: increase fragmentation to improve uniform distribution
Fixes: https://tracker.ceph.com/issues/51060
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-06-01 20:25:17 -07:00
Yan, Zheng
e76abf517b qa/cephfs: update ephemeral pin tests
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2020-10-13 20:52:40 +08:00
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
091e8ffd9d
qa: break export pin tests into discrete tests
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:32 -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
Sidharth Anupkrishnan
aa99c8546b
qa: add tests for ephemeral pinning
Signed-off-by: Sidharth Anupkrishnan <sanupkri@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
c050623065
qa: refactor _wait_subtree and _get_subtree
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:30 -07:00
Patrick Donnelly
ddb18091a6
qa: use status from wait_for_daemons
Avoid an extra `fs dump` call.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:30 -07:00
Patrick Donnelly
3c1330795a
qa: return a string via getfattr
Fixes: https://tracker.ceph.com/issues/45666
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-05-22 14:15:19 -07:00
Sidharth Anupkrishnan
b98f3e388b qa/test_exports: fix TestExports failure under new python3 compability changes
self.mount_a.client_remote.sh() returns an 'str' object rather than a StringIO object. Hence the p.stdout.getvalue() produces an error. This commit fixes this and also fix str and byte mismatch as byte and string were the same object in Python2 but this is not the case in Python3.

Signed-off-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
2020-04-30 15:49:32 +05:30
Kefu Chai
496d7e2132 qa/tasks/cephfs: fix syntax error
it's a regression introduced by 9f6c764f10

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-24 18:27:55 +08:00
Kyr Shatskyy
9f6c764f10 qa/tasks/cephfs: get rid of StringIO for py3
Use io.BytesIO and six.ensure_str for py3 compatibility

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-06 10:19:55 +01: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
Yan, Zheng
89759654c1 qa/cephfs: add test for blacklisted client eviction
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-06-05 21:05:06 +08:00
Sidharth Anupkrishnan
9f40c783db qa: fs Ignore getfattr errors for ceph.dir.pin
Signed-off-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
2019-05-09 18:46:21 +05:30
Zhi Zhang
36f85fd3bb qa: add test for getfattr ceph.dir.pin
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
2018-11-19 11:20:26 +08:00
Patrick Donnelly
fbc25b4486
mds: check for session import race
Credit to Yan Zheng for identifying the race condition [1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1572555#c7

Test-for: http://tracker.ceph.com/issues/24072

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-05-14 12:52:50 -07:00
Patrick Donnelly
8db2c43e79
qa: test export_pin is correct in dumped subtree
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-07-31 15:33:49 -07:00
Patrick Donnelly
97cdb1e34a
Merge remote-tracking branch 'upstream/pull/15817/head' into master
* upstream/pull/15817/head:
  qa: wait for healthy cluster before testing pins

Reviewed-by: Zheng Yan <zyan@redhat.com>
2017-07-06 21:36:34 -07:00
John Spray
b6cfa35458 qa: no longer need to explicitly enable multimds
Signed-off-by: John Spray <john.spray@redhat.com>
2017-06-23 17:07:34 +01:00
Patrick Donnelly
d4870a093c
qa: wait for healthy cluster before testing pins
Fixes: http://tracker.ceph.com/issues/20318

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-06-21 13:21:32 -07:00
John Spray
7e1be30b9a qa: clean up test_exports.py
Mainly just using the setfattr helper
instead of run_shell.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-06-01 07:18:03 -04:00
Patrick Donnelly
76335b0e0f
qa: improve debug message for subtree wait
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-05-30 09:08:27 -07:00
Patrick Donnelly
9552efde4a
qa: improve time handling for test_exports test
Also catches corner-case found by Zheng where an unjournaled directory will
cause export pinning to fail because it cannot be made a subtree until its
parent is stable.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-05-05 19:07:05 -04:00
Patrick Donnelly
63cbe330b7
qa: remove errant mount requirement
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-05-02 18:29:08 -04:00
Patrick Donnelly
6bd58fefb7
mds: use aux subtrees for export pinned inodes
Idea here is that a pinned inode should not be exported when its parent is.
Setting the pinned inode's dirfrags to aux subtrees prevents them from being
merged with a parent subtree.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-05-02 00:30:35 -04:00
Patrick Donnelly
0b420be7e9
mds: add export_pin feature
This allows the client/admin to pin a directory tree to a particular rank,
preventing its export by the dynamic balancer.

Fixes: http://tracker.ceph.com/issues/17834

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-19 18:21:19 -04:00