Commit Graph

35 Commits

Author SHA1 Message Date
Venky Shankar
01154fc41c qa: pass subdir arg when executing workunit
`_run_tests()` accepts subdir argument (to run a workunit with
the passed in sub-directory as cwd). One invocation was missing
the subdir argument causing `subdir` tag in yaml to be ineffective.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2021-10-25 12:40:53 +05:30
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
Kotresh HR
2bd6ba8026 test: Add test for mgr hang when osd is full
Add fs suite for tests requiring one node as well.

Fixes: https://tracker.ceph.com/issues/50532
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2021-05-22 19:09:07 +05:30
Kyr Shatskyy
e5b06d6431 qa/tasks/workunit: use remote.read_file instead of misc.get_file
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-09-04 00:02:16 +02:00
Kefu Chai
56c86bbb23 qa/tasks/workunit: allow passing optional args to workunit
* add comment to _run_tests()
* use `os.path.commonpath()` instead using string matching directly
  for matching given workunit spec with executables.
* allow passing optional args to workunit

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-22 15:26:54 +08:00
Kefu Chai
3573f33744 qa/tasks/workunit: drop py2 support
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-05 10:58:28 +08:00
Thomas Bechtold
f5e77561e9 qa: Fix problems detected by mypy
This is a first step to enable mypy on the qa/ directory.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-03-05 06:53:31 +01:00
Kyr Shatskyy
ae6befb3be qa/tasks/workunit: py3 compat
Use six.ensure_str for `get_file()` output in order to
make code py3 compatible

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-04 13:09:16 +08:00
Kyr Shatskyy
1c81d3873d qa/tasks: fix import module path for py3 compat
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-04 13:09:16 +08:00
Sage Weil
52cb75acf3 qa/tasks/workunit: accept coverage_and_limits: false
Allow workunits without teuthology tools (normally installed by ceph.py,
IIRC).

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-07 17:57:45 -06: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
Kyr Shatskyy
50b1823fac qa: get rid of iteritems for python3 compatibility
Fixes: https://tracker.ceph.com/issues/42267
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-15 11:27:39 +02:00
Kyr Shatskyy
5f95b532aa qa: get rid of iterkeys for py3 compatibility
Fixes: https://tracker.ceph.com/issues/42287

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-11 18:54:29 +02:00
Patrick Donnelly
dc6e7eadf8
qa: increase timeout for cleanup
Apparently 15m is not long enough for some workunits like fsstress.

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

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-10-09 13:31:26 -07:00
Patrick Donnelly
3a10d74f3a
qa: add timeout to cleaning up workunit sandbox
If there is a bug preventing rm from completing, the workunit will get stuck.

Fixes: http://tracker.ceph.com/issues/36184
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-09-30 18:12:19 -07:00
Patrick Donnelly
d4b8f94cf8
qa: do not cleanup sandbox on error
Otherwise the command will hang if the mount is broken.

Fixes: http://tracker.ceph.com/issues/36184
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-09-30 18:12:11 -07:00
Patrick Donnelly
70844f3f55
qa: cleanup workunit dir for each unit
This was wrongly dropped and moved to the finalizer.

Introduced-by: de824f74dd
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-09-24 11:29:10 -07:00
Patrick Donnelly
1eaf78a754
qa: use sudo to cleanup workspace
Files in scratch_tmp may not be owned by ubuntu.

Fixes: http://tracker.ceph.com/issues/36165
Introduced-by: de824f74dd
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-09-24 11:02:49 -07:00
Patrick Donnelly
de824f74dd
qa: cleanup parallel execution of fsstress
Two instances of fsstress clobber each other. Just build it in the local sandbox.

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

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-09-21 11:34:20 -07:00
Ilya Dryomov
e1c89b51c8 qa/tasks/workunit: factor out overrides and refspec logic
Allow for reuse in the cram task.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-09-06 22:31:55 +02:00
Patrick Donnelly
91942df5a6
qa: add test for snap format upgrade
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-05-03 09:09:03 -07:00
Sage Weil
2e5955212d qa/tasks/workunit: allow alt basedir
Instead of 'qa/workunits' allow something like 'qa/standalone'.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-24 15:44:51 -04:00
Nathan Cutler
98eda9a4dc qa: workunit: handle repo ending in "/ceph-ci"
If the repo ends in "/ceph-ci" it's the same as if it ended in "/ceph-ci.git"

Before this change, the following command was broken if the workunit specified,
e.g., "branch: jewel":

teuthology-suite --ceph-repo https://github.com/ceph/ceph --ceph master
--suite-repo https://github.com/ceph/ceph-ci --suite-branch wip-foo . . .

Fixes: http://tracker.ceph.com/issues/20554
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2017-07-08 19:03:30 +02:00
Kefu Chai
47080150a1 qa/tasks/workunit.py: use "overrides" as the default settings of workunit
otherwise the settings in "workunit" tasks are always overridden by the
settings in template config. so we'd better follow the way of how
"install" task updates itself with the "overrides" settings: it uses the
"overrides" as the *defaults*.

Fixes: http://tracker.ceph.com/issues/19429
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-02 12:26:30 +08:00
Kefu Chai
9ca7ccf5f1 tasks/workunit.py: specify the branch name when cloning a branch
c1309fb failed to specify a branch when cloning using --depth=1, which
by default clones the HEAD. and we can not "git checkout" a specific
sha1 if it is not HEAD, after cloning using '--depth=1', so in this
change, we dispatch "tag", "branch", "HEAD" using three Refspec classes.

Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2017-03-30 20:30:09 -07:00
Dan Mick
c1309fbef3 tasks/workunit.py: when cloning, use --depth=1
Help avoid killing git.ceph.com.  A depth 1 clone takes about
7 seconds, whereas a full one takes about 3:40 (much of it
waiting for the server to create a huge compressed pack)

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2017-03-28 20:09:44 -07:00
Kefu Chai
edceabbd47 qa/tasks/workunit: use ceph.git as an alternative of ceph-ci.git for workunit repo
if we run upgrade test, where, for example, "jewel" is not in
ceph-ci.git repo, we should check ceph.git to clone the workunits.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-02-27 17:36:05 +08:00
Kefu Chai
4cf28de4c9 qa/tasks/workunit: use the suite repo for cloning workunit
as "workunits" reside in ceph/qa/workunits, it's more intuitive to
respect suite-repo option when cloning workunits.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-02-24 16:47:47 +08:00
Sage Weil
96bc86b537 Revert "qa/tasks/workunit: use the suite repo for cloning workunit" 2017-02-17 11:54:27 -06:00
Kefu Chai
1f82b9b944 qa/tasks/workunit: use the suite repo for cloning workunit
as "workunits" reside in ceph/qa/workunits, it's more intuitive to
respect suite-repo option when cloning workunits.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-02-16 15:05:51 +08:00
Sage Weil
2a7013cd5a qa/tasks/workunit: clear clone dir before retrying checkout
If we checkout ceph-ci.git, and don't find a branch,
we'll try again from ceph.git. But the checkout will
already exist and the clone will fail, so we'll still
fail to find the branch.

The same can happen if a previous workunit task already
checked out the repo.

Fix by removing the repo before checkout (the first and
second times).  Note that this may break if there are
multiple workunit tasks running in parallel on the same
role.  That is already racy, so if it's happening, we'll
want to switch to using a truly unique clonedir for each
instantiation.

Fixes: http://tracker.ceph.com/issues/18336
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-22 13:05:22 -05:00
Sage Weil
72d73b8c88 qa/tasks/workunit: retry on ceph.git if checkout fails
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-16 15:06:16 -05:00
Sage Weil
27b8eac249 qa/tasks/workunit.py: add CEPH_BASE env var
Root of git checkout

Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-15 13:52:03 -05:00
Sage Weil
4602884ab8 qa/tasks/workunit: leave workunits inside git checkout
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-15 13:52:03 -05:00
Sage Weil
c01f2ee0e2 move ceph-qa-suite dirs into qa/ 2016-12-14 11:29:55 -06:00