Commit Graph

6718 Commits

Author SHA1 Message Date
Jason Dillaman
267af5fcae qa/suites/rbd: tweak 'require_osd_release' to 'pacific'
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-04-14 08:43:29 -04:00
Casey Bodley
577f211391 test: add ceph_test_cls_cmpomap
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2020-04-13 09:23:44 -04:00
Sage Weil
d3d1ea5507 Merge PR #34272 into master
* refs/pull/34272/head:
	mgr/PyModuleRegistry: ignore 'obsolete' modules
	qa/suites/fs/upgrade: start with msgr2
	qa/suites/fs/upgrade: s/mimic/nautilus/
	qa/suites/upgrade: whitelist when orchestrator_cli can't be loaded
	qa/standalone/mon/msgr-v2-transition: remove test
	mon/MgrMonitor: disable orchestrator_cli if >= octopus
	qa/suites/ugprade: remove mimic -> pacific upgrade tests
	qa/standalone/mon/misc: update TEST_mon_features
	mon/MgrMap: use always_on_modules from most recent release
	mon/MonCommands: require-osd-release pacific
	qa/suites/rados/thrash-old-clients: adjust octopus package list for el7
	doc/dev/release-kickoff-checklist: include ceph-build change
	qa/workunits/cephtool/test.sh: fix require-osd-release test
	mon/MgrMonitor: define mgr modules for pacific
	doc/dev/release-checklists: generalize
	doc/dev/release-kickoff-checklist: quotes
	qa/suites/rados/thrash-old-clients/1-install/octopus
	qa/releases/pacific.yaml
	mds/cephfs_features: CEPHFS_CURRENT_RELEASE
	doc/dev/release-kickoff-checklist: a few other items
	osd: remove redundant check
	mon/OSDMonitor: make pacific changes
	mon/mon_types: add mon pacific feature
	include/ceph_features: define SERVER_PACIFIC
	include/ceph_features: fix whitespace
	mon: persistent INCOMPAT_PACIFIC item
	ceph-volume: __release__ == pacific
	script: update backport scripts for now-released octopus
	common: pacific release constants
	doc/dev/release-kickoff-checklist
	src/ceph_release: pacific, 16, dev
	CMakeLists: 16.0.0

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2020-04-12 17:33:57 -05:00
Kefu Chai
e7ead41ed1
Merge pull request #34487 from tchaikov/wip-test-cronjob-py3
qa/tests: pass "-t 2" to teuthology-suite when testing non-master bra…

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
2020-04-10 09:42:42 +08:00
Sebastian Wagner
370f2c033e
Merge pull request #34454 from mgfritch/cephadm-osd-fsid-test
qa/workunits/cephadm/test_cephadm.sh: add fsid to ceph-volume cmds

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-04-09 16:07:34 +02:00
Ilya Dryomov
4b04f2ba83
Merge pull request #34471 from idryomov/wip-rbd-fio-rstrip
qa/tasks/rbd_fio: unbreak after the conversion from StringIO

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-04-09 11:37:14 +02:00
Mykola Golub
978a2e364f
Merge pull request #34408 from dillaman/wip-44727
rbd-mirror: improved replication statistics

Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-04-09 10:13:57 +03:00
Kefu Chai
21dacc823b qa/tests: pass "-t 2" to teuthology-suite when testing non-master branches
-t is an alias of "--teuthology-branch" which defaults to master. we
have a "py2" branch in teuthology. that branch is compatible with
python2, and the teuthology-worker is executed in a Python2 environment,
so all qa suites tested using "py2" branch of teuthology should work
fine as long as they are Python2 compatible. currently, all LTS branches
are compatible with Python2, and only master is also compatible with
Python3. but we plan to migrate master and octopus' qa suites to
python3 to ease the pain of maintainance in long term.

to achieve this goal, in this change, all non-master branches are now
tested using the "py2" teuthology branch.

once the python3 compatible changes are backported to octopus, "-t 2"
options will be removed from the command lines testing octopus.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-09 11:19:03 +08:00
Kefu Chai
8c63b26fe8
Merge pull request #34264 from tchaikov/wip-qa-py3
qa/tasks: be python3 compatible

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2020-04-09 10:08:44 +08:00
Sage Weil
8aa9c88f3e qa/suites/fs/upgrade: start with msgr2
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 15:46:36 -05:00
Michael Fritch
7e26083d92
qa/workunits/cephadm/test_cephadm.sh: use fsid during dump_log
needed when running with multiple ceph clusters

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-04-08 14:39:50 -06:00
Sage Weil
985c203eec qa/suites/fs/upgrade: s/mimic/nautilus/
Also rename 3-compat_client/mimic -> pacific to match the min_client
setting (the naming here confuses me...).

Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:10:32 -05:00
Sage Weil
be5f525df0 qa/suites/upgrade: whitelist when orchestrator_cli can't be loaded
This happens because mgrs may start before mons, or before mons have
published a new mgrmap that disables orchestrator_cli.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:10:32 -05:00
Sage Weil
731e508bbe qa/standalone/mon/msgr-v2-transition: remove test
v2 was introduced in nautilus, and we don't support mimic -> pacific
upgrades (only mimic -> octopus).  This test can be removed!

Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:10:32 -05:00
Sage Weil
3c7d5291de qa/suites/ugprade: remove mimic -> pacific upgrade tests
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:10:32 -05:00
Sage Weil
279c437994 qa/standalone/mon/misc: update TEST_mon_features
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:10:32 -05:00
Sage Weil
858b3a9c55 qa/suites/rados/thrash-old-clients: adjust octopus package list for el7
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:09:41 -05:00
Sage Weil
6833f89990 qa/workunits/cephtool/test.sh: fix require-osd-release test
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:09:41 -05:00
Sage Weil
80fb39e469 qa/suites/rados/thrash-old-clients/1-install/octopus
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:09:41 -05:00
Sage Weil
ac34cedd13 qa/releases/pacific.yaml
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:09:41 -05:00
Kefu Chai
83c632099b mgr/telegraf: catch FileNotFoundError exception
in tasks/module_selftest.yaml, `TestModuleSelftest.test_telegraf()` is
called. but we fail to prepare a unix domain socket to which the telegraf
module can send stats. and telegraf module does not catch
FileNotFoundError exception, so the exception is populated to ceph-mgr
and is found by the test, hence the test is marked a failure whenever
telegraf is tested.

in this change,

* catch this exception, so it won't be caught by ceph-mgr
* whitelist the error message, so the test can pass

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-08 21:07:07 +08:00
Kefu Chai
f28a5fef3b qa/tasks/openssl_keys.py: sort cert configs before creating certs
we cannot rely on the order in which items are arranged in a dict, the
order varies from version to another. in Python2, it happens to work,
and we can always have the self-signed cert added first. but in Python3,
it does not. and an exception is thrown
```
teuthology.exceptions.ConfigError: ssl: ca root not found for
certificate rgw.client.0
```

in this change, before creating certs, the settings are reordered so
that the self-signed ones are created first.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-08 21:07:07 +08:00
Ilya Dryomov
c3f4f1d660 qa/tasks/rbd_fio: unbreak after the conversion from StringIO
Fix a bad typo in commit db7ae8eff60a ("qa/tasks/rbd_fio: get rid of
StringIO for py3").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-04-08 12:24:51 +02:00
Kefu Chai
ae9247b7a0
Merge pull request #34342 from ideepika/fixes-44862
mon: calculate min_size on osd pool set size

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-04-08 15:39:48 +08:00
Kefu Chai
e4cad106cd
Merge pull request #34451 from tchaikov/wip-standalone-pgid
qa/standalone/scrub: s/$(pgid)/${pgid}/

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-04-08 12:50:47 +08:00
Kefu Chai
77ec9ce88d qa/tasks/ceph_objectstore_tool.py: use str.startswit
in Python3, string module does not offer `string.find()` anymore, let's
use `str.find()` method instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-08 12:32:56 +08:00
Kefu Chai
6fba221605 qa/standalone/scrub: s/$(pgid)/${pgid}/
to address the test failures like
```
2020-04-07T15:44:58.693 INFO:tasks.workunit.client.0.smithi049.stderr:/home/ubuntu/cephtest/clone.client.0/qa/standalone/scrub/osd-scrub-repair.sh:498: TEST_auto_repair_bluestore_failed:  ceph pg dump
pgs
2020-04-07T15:44:58.694 INFO:tasks.workunit.client.0.smithi049.stderr://home/ubuntu/cephtest/clone.client.0/qa/standalone/scrub/osd-scrub-repair.sh:498: TEST_auto_repair_bluestore_failed:  pgid
2020-04-07T15:44:58.694 INFO:tasks.workunit.client.0.smithi049.stderr:/home/ubuntu/cephtest/clone.client.0/qa/standalone/scrub/osd-scrub-repair.sh: line 498: pgid: command not found
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-08 11:02:29 +08:00
Kefu Chai
6bc09c5041 qa/tasks/ceph_manager.py: do not return a filter
as the caller might want to `len(manager.get_osd_status()['raw'])`, and
`len()` does not accept a `filter` object.

also, the filtered osd statuses are printed out using `self.log()`, so
we should materialize the `filter` object before sending it to logging
facility. otherwise we will have something like:
```
2020-04-08T02:58:37.001 INFO:tasks.ceph.ceph_manager.ceph:<filter object at 0x7f5a080e1518>
```
in the logging message.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-08 11:02:29 +08:00
Kefu Chai
f1375de3eb
Merge pull request #33945 from rishabh-d-dave/fs-qa-vstart_runner.LocalRemote.sh
qa/vstart_runner: update vstart_runner.LocalRemote.sh

Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
2020-04-08 09:53:32 +08:00
Yuri Weinstein
7c2a0a455e
Merge pull request #34456 from ceph/wip-crontab-master
qa/tests: removed ceph-deploy from master and octopus (ceph-deploy is…
2020-04-07 17:29:05 -07:00
yuriw
2dc7af0f0f qa/tests: removed ceph-deploy from master and octopus (ceph-deploy isn't written to run on el8)
Signed-off-by: yuriw <yuri.weinstein@gmail.com>
2020-04-07 16:47:56 -07:00
Michael Fritch
3848ec26bf
qa/workunits/cephadm/test_cephadm.sh: add fsid to ceph-volume cmds
needed when testing with a multi-cluster setup

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-04-07 15:27:35 -06:00
Kefu Chai
b1738cd1ef qa/standalone/scrub: s/$(pgid)/${pgid}/
to address the test failures like
```
2020-04-07T15:44:58.693 INFO:tasks.workunit.client.0.smithi049.stderr:/home/ubuntu/cephtest/clone.client.0/qa/standalone/scrub/osd-scrub-repair.sh:498: TEST_auto_repair_bluestore_failed:  ceph pg dump
pgs
2020-04-07T15:44:58.694 INFO:tasks.workunit.client.0.smithi049.stderr://home/ubuntu/cephtest/clone.client.0/qa/standalone/scrub/osd-scrub-repair.sh:498: TEST_auto_repair_bluestore_failed:  pgid
2020-04-07T15:44:58.694 INFO:tasks.workunit.client.0.smithi049.stderr:/home/ubuntu/cephtest/clone.client.0/qa/standalone/scrub/osd-scrub-repair.sh: line 498: pgid: command not found
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-08 00:54:46 +08:00
Kefu Chai
6eb57a2a4f qa/tasks/cephadm.py: decode data returned by teuthology.get_file()
it's used as part of the command line sent to shell, so we need to
decode it first.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 23:06:20 +08:00
Kefu Chai
6c2f40a528 qa/tasks/mgr: s/urllib.quote_plus/parse.quote_plus/
in Python3, urllib.quote_plus is moved into urllib.parse, let's use
six.moves at this moment.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
96ed9c87c0 qa/tasks/radosgw_admin.py: coerce key.name and key.acl to str
if `key.name` is not set, boto fills it with md5, in that case, it comes
from `base64.b64encode()`. so we need to make sure it's str before
passing it to shell.

the same applies to `key.get_xml_acl()`, as its return value comes
directly from something like
```
        response = self.connection.make_request('GET', self.name, key_name,
                                                query_args=query_args,
                                                headers=headers)
        body = response.read()
        # ...
        return body
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
9ccf88d95f qa/tasks: pass encoding to Key.get_content_as_string()
we assume that boto.Key.get_content_as_string() returns str instead of
bytes, and compare the return value with a string, so, to ensure that
lhs and rhs are both strings, we need to decode the returned content.

since we always store strings composed with ASCII, it's safe to use
'ascii' to decode them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
dcecf1dbe4 qa/tasks/s3tests_java.py: do not change a dict while iterating it
in Python3, dict.items() returns a view instead of an instance of list,
so we have to materialize the view for changing the dict being iterated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +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
c79e1e1a52 qa/tasks/barbican.py: convert to str before json.loads()
in Python3, json.loads() expects a string, while
HTTPConnection.getresponse() returns a byte-like object, so we need to
coerce it to str first.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
590e9b35aa qa/tasks/radosgw_admin.py: do not use dict.has_keys()
in python3, `dict.has_key()` was removed. let's use __contains__
instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
5ef3a5fe32 qa/tasks/tempest.py: always write str is value of options
in Python2, ConfigParser is almost the same as RawConfigParser, which
allows set non-string values, but in Python3, ConfigParser.set() only
accepts strings as value of option.

since we do not use "cpar" as an internal storage for options, it does
not matter what type of options we set using ConfigParser as long as it
can be consumed by tempest. boolean settings are translated to "true" or
"false". see also
https://docs.openstack.org/tempest/latest/sampleconf.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
b1726bfb08 qa/tasks/tempest.py: use configparser from six.moves
as ConfigParser is offerd by `configparser` module in Python3, so use
six.moves before the migration.

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
Kefu Chai
4a9c43313a qa/tasks/radosgw_admin: use HTTPMessage as a dict in PY3
in Python3, HTTPMessage is a dict-like class by itself, and it does not
offer `dict` attribute anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
35a3d5f7f8 qa/tasks/keystone.py: use list(a_dict) for concatenating lists
`dict.items()` does not return a list in python3, so we need to convert
it to a list first.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
5d0dc8346c qa/tasks/util/rgw: use StringIO for capturing strings
this change should address the failure of
```
2020-04-06T03:07:59.152 ERROR:teuthology.contextutil:Saw exception from nested tasks
Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_git_teuthology_wip-py3/teuthology/contextutil.py", line 32, in nested
    vars.append(enter())
  File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/home/teuthworker/src/github.com_tchaikov_ceph_wip-qa-py3/qa/tasks/rgw.py", line 266, in configure_compression
    rgwadmin(ctx, client, cmd=['user', 'list'], check_status=True)
  File "/home/teuthworker/src/github.com_tchaikov_ceph_wip-qa-py3/qa/tasks/util/rgw.py", line 43, in rgwadmin
    j = json.loads(out)
  File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
981ad34987 qa/tasks/cephfs/test_cephfs_shell: assertRegex(text, regex)
per Python3 doc of unittest,

> assertRegex(text, regex, msg=None)

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:23 +08:00
Kefu Chai
7f48f61bdc qa/tasks/cephfs: return ascii decoded xattr
as callers of `TestForwardScrub._read_str_xattr()` expects str.

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