Commit Graph

27 Commits

Author SHA1 Message Date
Kyr Shatskyy
36ab658ba7 qa/tasks/ragweed: use remote.write_file
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-09-04 00:02:15 +02:00
Kefu Chai
87e61e1d6e qa/tasks/ragweed: always set ragweed_repo
* extract get_ragweed_branch() out of download() task, for better
  readablity.
* use a loop for retry when the first clone fails
* drop the `raise ValueError()` clause as it never happens. we could use
  an assert() here, but i don't think it is necessary anyway.
* use sh() instead of run() for better readablity.
* always set ragweed_repo. before this change this variable is
  unbounded if `force-branch` is set.

Fixes: https://tracker.ceph.com/issues/46771
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-31 13:08:56 +08:00
Kefu Chai
fe6c9b5487 qa/tasks/ragweed: flake8 fixes
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-23 23:01:27 +08:00
Kefu Chai
3809737fb8 qa/tasks/ragweed.py: open file in text mode
this file is a template for `boto.cfg` which only contains text, so we
can just open it in text mode, and the file-like object will be passed
to run() as stdin, which is able to consume strings.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
91b49ab39d qa,test: decode return val of base64.b64encode()
base64.b64encode() returns bytes in Python3, and we will pass it as a
commandline parameter later on, which will be quoted. so the command
line can be consumed by shell. so before sending it to shell, we should
convert it to string.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
6ad2ca9767 qa/tasks/ragweed.py: use str methods of helper from string module
in Python3, some methods offered by `string` module are now member
method of `str` class, and `string.uppercase` is renamed to
`string.ascii_uppercase` in Python2 and Python3. so let's update
accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kyr Shatskyy
f0c5f56ef8 qa/tasks/ragweed: get rid of cString for py3
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-06 10:19:55 +01:00
Kyr Shatskyy
b3e42cf30c qa/tasks/ragweed: get rid of itervalues for py3
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-06 10:19:55 +01:00
Kefu Chai
4c6a5798c2
Merge pull request #32222 from toabctl/qa-flake8-py3
qa: Run flake8 on python2 and python3

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-12-24 10:47:07 +08:00
Sage Weil
3268ec7ac8 Merge PR #32252 into master
* refs/pull/32252/head:
	qa/cephfs/begin: libaio-devel on el8
	qa/tasks: nosetests -> python -m nose
	qa/tasks/rbd_fio: fio 2.21 -> 3.16
	src/test/cli-integration/rbd/snap-diff.t: python -> python
	qa/workunits: use nose 3
	qa/tasks/cbt: install python3 deps
	qa/tasks/ceph_manager.py: do not use python to write a file
	test/pybind/test_rados: execute takes a bytes (not str) payload
	qa/packages/packages: python[3]-ceph is no more
	qa: use python3 for venvs etc
	packaging: remove python3-ipaddres, as it is part of the stdlib in py3
	qa/packages: python-ceph -> python3-ceph
	qa/distros: centos7 -> centos8, rhel7 -> rhel8
	spec: remove _python_buildid in favor of python3_pkgversion macro
	spec: remove python2 packages and conditions
	debian: remove python >= 2.7 requirement
	debian: add mgr python versions
	debian: explicitly set PYTHON2=OFF to prevent picking up python2 interpreter
	debian: update control file to use python3 dependency names
	debian: remove all python2 overrides and declarations
	debian: remove all python2 install files

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2019-12-17 15:23:27 -06:00
Sage Weil
6476517def qa/tasks: nosetests -> python -m nose
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-17 12:57:57 -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
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
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
Casey Bodley
c9aac91b18 qa/ragweed: use correct endpoint from rgw_server
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2019-09-17 08:19:28 -04:00
Yuri Weinstein
0f6b30d600 qa/tests: added ragweed coverage to stress-split* upgrade suites
added ceph config set global bluestore_warn_on_legacy_statfs fals
changed user "foo" to "ragweed" in ragweed.py

Fixes: http://tracker.ceph.com/issues/40452
Fices: http://tracker.ceph.com/issues/40467
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
2019-07-08 12:51:51 -07:00
Casey Bodley
09e992ff01 qa/rgw: extra s3tests tasks use rgw endpoint configuration
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2019-06-19 07:50:35 -04:00
Yehuda Sadeh
83f7af473b qa/ragweed: change the way we determine which ragweed branch to use
- if force-branch, use that
 - otherwise:
    - read default-branch from client config
    - use suite branch or ceph branch if suite branch is not defined
    - if this branch is one of official releases (or master), prefix
      it with 'ceph-'

try to clone branch specified above, if failed (branch doesn't exist probably)
and not force-branch, use default-branch.
Also add an option to override ragweed repo.

Switched all force-branch from ragweed qa suite to default-branch.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2019-01-09 11:02:57 -08:00
Casey Bodley
1908b54996 qa/rgw: ragweed task conditionally sets is_secure
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-03-09 16:31:33 -05:00
Casey Bodley
d4c33f0177 qa/rgw: add class for rgw endpoints
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-03-09 16:31:32 -05:00
Yehuda Sadeh
930f3b85e2 qa/tasks/ragweed: don't reference fastcgi
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-02-19 14:45:51 -08:00
Yehuda Sadeh
c2e2d8a380 qa/tasks/ragweed: only init config when doing prepare
and only remove users when doing check.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-02-19 14:45:51 -08:00
Yehuda Sadeh
831645c3cf qa/tasks/ragweed: configurable stages
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-02-19 14:45:51 -08:00
Yehuda Sadeh
cb1660d566 qa/tasks/ragweed: point at ceph.conf in config
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-02-19 14:45:51 -08:00
Yehuda Sadeh
7bf2296bdd qa/tasks/ragweed: set system flag on system user
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-02-19 14:45:51 -08:00
Yehuda Sadeh
82c1295196 qa/tasks: add ragweed task
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-02-19 14:45:51 -08:00