]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
5 years agokv/KeyValueDB: Made open/close a complementary operations. 34510/head
Adam Kupczyk [Fri, 10 Apr 2020 12:49:52 +0000 (14:49 +0200)]
kv/KeyValueDB: Made open/close a complementary operations.

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
5 years agokv/KeyValueDB: Test for idempotency of open/close
Adam Kupczyk [Fri, 10 Apr 2020 12:47:00 +0000 (14:47 +0200)]
kv/KeyValueDB: Test for idempotency of open/close

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
5 years agoMerge pull request #34508 from tchaikov/wip-45022
Kefu Chai [Fri, 10 Apr 2020 11:34:03 +0000 (19:34 +0800)]
Merge pull request #34508 from tchaikov/wip-45022

selinux: add "type http_cache_port_t" in require section

Reviewed-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
5 years agoMerge pull request #34494 from idryomov/wip-krbd-unmap-spacing
Ilya Dryomov [Fri, 10 Apr 2020 08:29:57 +0000 (10:29 +0200)]
Merge pull request #34494 from idryomov/wip-krbd-unmap-spacing

tests: update unmap.t for table spacing changes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agoselinux: add "type http_cache_port_t" in require section 34508/head
Kefu Chai [Fri, 10 Apr 2020 06:27:48 +0000 (14:27 +0800)]
selinux: add "type http_cache_port_t" in require section

this addresses the regression introduced by
611a2a7ce1713cf92797b19d8a9a93a7dfc68fa5

Fixes: https://tracker.ceph.com/issues/45022
Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34499 from ceph/wip-rtd
Kefu Chai [Fri, 10 Apr 2020 01:43:28 +0000 (09:43 +0800)]
Merge pull request #34499 from ceph/wip-rtd

doc: enable Read the Docs

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
5 years agoMerge pull request #34487 from tchaikov/wip-test-cronjob-py3
Kefu Chai [Fri, 10 Apr 2020 01:42:42 +0000 (09:42 +0800)]
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>
5 years agodoc: add in-doc search from read the docs 34499/head
Kefu Chai [Thu, 9 Apr 2020 15:14:42 +0000 (23:14 +0800)]
doc: add in-doc search from read the docs

readthedocs-sphinx-search features better user experience than the
builtin search offered by sphinx

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agodoc: use plantweb as fallback of sphinx-ditaa
Kefu Chai [Thu, 9 Apr 2020 13:25:39 +0000 (21:25 +0800)]
doc: use plantweb as fallback of sphinx-ditaa

RTD does not support installing system packages, the only ways to install
dependencies are setuptools and pip. while ditaa is a tool written in
Java. so we need to find a native python tool allowing us to render ditaa
images. plantweb is able to the web service for rendering the ditaa
diagram. so let's use it as a fallback if "ditaa" is not around.

also start a new line after the directive, otherwise planweb server will
return 500 at seeing the diagram.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34502 from ceph/kalebskeithley-patch-1-2
Daniel Gryniewicz [Thu, 9 Apr 2020 18:24:09 +0000 (14:24 -0400)]
Merge pull request #34502 from ceph/kalebskeithley-patch-1-2

Update ceph.te

5 years agoMerge pull request #34484 from cbodley/wip-sub-spawn
Matt Benjamin [Thu, 9 Apr 2020 18:17:52 +0000 (14:17 -0400)]
Merge pull request #34484 from cbodley/wip-sub-spawn

spawn: update submodule

5 years agoUpdate ceph.te 34502/head
kalebskeithley [Thu, 9 Apr 2020 17:00:57 +0000 (13:00 -0400)]
Update ceph.te

Fixes: https://tracker.ceph.com/issues/45022
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
5 years agodoc/conf.py: exclude pybindings docs from build for RTD
Kefu Chai [Thu, 9 Apr 2020 08:51:06 +0000 (16:51 +0800)]
doc/conf.py: exclude pybindings docs from build for RTD

because it'd difficult to prepare (dummy) librados,libcephfs and librbd for
their python bindings in the building environment offered by Read the Docs.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34314 from ishanrai05/html-cleanup
Lenz Grimmer [Thu, 9 Apr 2020 14:15:50 +0000 (16:15 +0200)]
Merge pull request #34314 from ishanrai05/html-cleanup

mgr/dashboard: Clean up HTML

Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
5 years agoMerge pull request #34223 from liewegas/cephadm-dashboard-grafana-ssl-verify
Sebastian Wagner [Thu, 9 Apr 2020 14:10:57 +0000 (16:10 +0200)]
Merge pull request #34223 from liewegas/cephadm-dashboard-grafana-ssl-verify

mgr/cephadm: disable dashboard's grafana cert ssl_verify if we generate it

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge pull request #34454 from mgfritch/cephadm-osd-fsid-test
Sebastian Wagner [Thu, 9 Apr 2020 14:07:34 +0000 (16:07 +0200)]
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>
5 years agoMerge pull request #34249 from mgfritch/cephadm-nfs-common-config
Sebastian Wagner [Thu, 9 Apr 2020 14:05:59 +0000 (16:05 +0200)]
Merge pull request #34249 from mgfritch/cephadm-nfs-common-config

mgr/cephadm: nfs common config

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Varsha Rao <varao@redhat.com>
5 years agoMerge pull request #34485 from mgfritch/cephadm-no-func
Sebastian Wagner [Thu, 9 Apr 2020 14:03:36 +0000 (16:03 +0200)]
Merge pull request #34485 from mgfritch/cephadm-no-func

cephadm: show error when no command is specified

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge pull request #34411 from votdev/issue_44589
Lenz Grimmer [Thu, 9 Apr 2020 11:25:11 +0000 (13:25 +0200)]
Merge pull request #34411 from votdev/issue_44589

mgr/dashboard: lint error on plugins/debug.py

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agotests: update unmap.t for table spacing changes 34494/head
Ilya Dryomov [Thu, 9 Apr 2020 10:41:34 +0000 (12:41 +0200)]
tests: update unmap.t for table spacing changes

Introduced in 4d42b4c5a0ed ("common/TextTable: default to 2 spaces
separating columns") and 41f003518a07 ("common/TextTable: only pad
between columns").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agoMerge pull request #34452 from rhcs-dashboard/fix-44923-master
Lenz Grimmer [Thu, 9 Apr 2020 10:20:41 +0000 (12:20 +0200)]
Merge pull request #34452 from rhcs-dashboard/fix-44923-master

mgr/dashboard: use FQDN for failover redirection

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
5 years agoMerge pull request #34471 from idryomov/wip-rbd-fio-rstrip
Ilya Dryomov [Thu, 9 Apr 2020 09:37:14 +0000 (11:37 +0200)]
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>
5 years agoreadthedocs: add .readthedocs.yml
Kefu Chai [Thu, 9 Apr 2020 07:35:15 +0000 (15:35 +0800)]
readthedocs: add .readthedocs.yml

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34408 from dillaman/wip-44727
Mykola Golub [Thu, 9 Apr 2020 07:13:57 +0000 (10:13 +0300)]
Merge pull request #34408 from dillaman/wip-44727

rbd-mirror: improved replication statistics

Reviewed-by: Mykola Golub <mgolub@suse.com>
5 years agoqa/tests: pass "-t 2" to teuthology-suite when testing non-master branches 34487/head
Kefu Chai [Thu, 9 Apr 2020 03:18:58 +0000 (11:18 +0800)]
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>
5 years agoMerge pull request #34264 from tchaikov/wip-qa-py3
Kefu Chai [Thu, 9 Apr 2020 02:08:44 +0000 (10:08 +0800)]
Merge pull request #34264 from tchaikov/wip-qa-py3

qa/tasks: be python3 compatible

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
5 years agoMerge pull request #34284 from liewegas/followon-34266-cleanup
Kefu Chai [Thu, 9 Apr 2020 00:39:27 +0000 (08:39 +0800)]
Merge pull request #34284 from liewegas/followon-34266-cleanup

mgr/DaemonServer: add missing ceph_abort

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agocephadm: show error when no command is specified 34485/head
Michael Fritch [Wed, 8 Apr 2020 20:42:12 +0000 (14:42 -0600)]
cephadm: show error when no command is specified

Traceback (most recent call last):
  File "./cephadm", line 4452, in <module>
    if args.func != command_check_host:
AttributeError: 'Namespace' object has no attribute 'func'

Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agoqa/workunits/cephadm/test_cephadm.sh: use fsid during dump_log 34454/head
Michael Fritch [Wed, 8 Apr 2020 19:35:02 +0000 (13:35 -0600)]
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>
5 years agoMerge pull request #34414 from yuvalif/add_timeout_to_http_client
Casey Bodley [Wed, 8 Apr 2020 19:35:11 +0000 (15:35 -0400)]
Merge pull request #34414 from yuvalif/add_timeout_to_http_client

rgw/http: add timeout to http client

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agospawn: update submodule 34484/head
Casey Bodley [Wed, 8 Apr 2020 18:40:09 +0000 (14:40 -0400)]
spawn: update submodule

pulls in fixes for exception handling, and support for multiple return
values with std::tuple<>

Signed-off-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34463 from jan--f/c-v-batch-filter-check-lvs-before-access
Jan Fajerski [Wed, 8 Apr 2020 16:07:06 +0000 (18:07 +0200)]
Merge pull request #34463 from jan--f/c-v-batch-filter-check-lvs-before-access

ceph-volume/batch: check lvs list before access

5 years agoMerge pull request #34472 from jan--f/c-v-noninteractive-batch-idempotency-all-filtered
Jan Fajerski [Wed, 8 Apr 2020 15:14:24 +0000 (17:14 +0200)]
Merge pull request #34472 from jan--f/c-v-noninteractive-batch-idempotency-all-filtered

ceph-volume/batch: return success when all devices are filtered

5 years agorbd-mirror: fixed race condition with snapshot sync and shutdown 34408/head
Jason Dillaman [Tue, 7 Apr 2020 16:13:46 +0000 (12:13 -0400)]
rbd-mirror: fixed race condition with snapshot sync and shutdown

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agoceph-volume/batch: return success when all devices are filtered 34472/head
Jan Fajerski [Wed, 8 Apr 2020 09:55:57 +0000 (11:55 +0200)]
ceph-volume/batch: return success when all devices are filtered

batch should only return an error if some (but not all) devices are
filtered. When only some devices are filtered the resulting osd layout
could look very different from what a user expects. If all devies are
filtered just return success.

Fixes: https://tracker.ceph.com/issues/44994
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agomgr/telegraf: catch FileNotFoundError exception 34264/head
Kefu Chai [Wed, 8 Apr 2020 12:21:25 +0000 (20:21 +0800)]
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>
5 years agoqa/tasks/openssl_keys.py: sort cert configs before creating certs
Kefu Chai [Wed, 8 Apr 2020 11:22:06 +0000 (19:22 +0800)]
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>
5 years agoMerge pull request #34398 from rzarzynski/wip-crimson-outdata-to-pglog
Kefu Chai [Wed, 8 Apr 2020 13:03:31 +0000 (21:03 +0800)]
Merge pull request #34398 from rzarzynski/wip-crimson-outdata-to-pglog

crimson/osd: record op's outdata and rval in pg log

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34466 from tchaikov/wip-cmake-get-git-version
Kefu Chai [Wed, 8 Apr 2020 12:29:08 +0000 (20:29 +0800)]
Merge pull request #34466 from tchaikov/wip-cmake-get-git-version

cmake: check $top_srcdir/.git directly

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
5 years agoMerge pull request #34220 from mgfritch/cephadm-nfs-container-image
Sebastian Wagner [Wed, 8 Apr 2020 11:46:00 +0000 (13:46 +0200)]
Merge pull request #34220 from mgfritch/cephadm-nfs-container-image

mgr/cephadm: allow config for an nfs `container_image`

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge pull request #34422 from dillaman/wip-44938
Mykola Golub [Wed, 8 Apr 2020 11:23:51 +0000 (14:23 +0300)]
Merge pull request #34422 from dillaman/wip-44938

rbd: ignore tx-only mirror peers when adding new peers

Reviewed-by: Mykola Golub <mgolub@suse.com>
5 years agoMerge pull request #34058 from rhcs-dashboard/44228-fix-frontend-services-subscriptio...
Lenz Grimmer [Wed, 8 Apr 2020 11:17:10 +0000 (13:17 +0200)]
Merge pull request #34058 from rhcs-dashboard/44228-fix-frontend-services-subscription-errors

mgr/dashboard: fix errors related to frontend service subscriptions.

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
5 years agoqa/tasks/rbd_fio: unbreak after the conversion from StringIO 34471/head
Ilya Dryomov [Wed, 8 Apr 2020 10:24:51 +0000 (12:24 +0200)]
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>
5 years agocrimson/osd: record op's outdata and rval in pg log. 34398/head
Radoslaw Zarzynski [Fri, 3 Apr 2020 11:42:45 +0000 (13:42 +0200)]
crimson/osd: record op's outdata and rval in pg log.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
5 years agoosd: pg_log_entry_t::set_op_returns() takes const reference now.
Radoslaw Zarzynski [Fri, 3 Apr 2020 11:41:30 +0000 (13:41 +0200)]
osd: pg_log_entry_t::set_op_returns() takes const reference now.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
5 years agocmake: check $top_srcdir/.git directly 34466/head
Kefu Chai [Wed, 8 Apr 2020 10:00:10 +0000 (18:00 +0800)]
cmake: check $top_srcdir/.git directly

in 0437adc33a8b83847ed36666971b5ea4d88a4901, we stop right before
reaching $top_srcdir, but we should stop at its parent directory.

in this change, instead of trying to be smart and to walk all the way
up to the root directory or $top_srcdir, we just check $top_srcdir/.git
directly, as we just know it's there or it does not exist at all.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoceph-volume/batch: check lvs list before access 34463/head
Jan Fajerski [Wed, 8 Apr 2020 08:41:56 +0000 (10:41 +0200)]
ceph-volume/batch: check lvs list before access

Fixes: https://tracker.ceph.com/issues/44989
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agomgr/dashboard: lint error on plugins/debug.py 34411/head
Volker Theile [Wed, 8 Apr 2020 07:55:05 +0000 (09:55 +0200)]
mgr/dashboard: lint error on plugins/debug.py

Make pylint for Python 3.8 and older versions happy.

Fixes: https://tracker.ceph.com/issues/44589
Signed-off-by: Volker Theile <vtheile@suse.com>
5 years agoMerge pull request #34229 from Yan-waller/wip-walle-fixsparsereadlength
Kefu Chai [Wed, 8 Apr 2020 07:42:26 +0000 (15:42 +0800)]
Merge pull request #34229 from Yan-waller/wip-walle-fixsparsereadlength

osd/PrimaryLogPG: fix SPARSE_READ stat

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #34342 from ideepika/fixes-44862
Kefu Chai [Wed, 8 Apr 2020 07:39:48 +0000 (15:39 +0800)]
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>
5 years agoMerge pull request #34219 from yanghonggang/bluefs-tool
Kefu Chai [Wed, 8 Apr 2020 07:34:16 +0000 (15:34 +0800)]
Merge pull request #34219 from yanghonggang/bluefs-tool

os/bluestore: Don't pollute old journal when add new device

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
5 years agoMerge pull request #34143 from tchaikov/wip-mgr-disable-dne-module
Kefu Chai [Wed, 8 Apr 2020 07:32:49 +0000 (15:32 +0800)]
Merge pull request #34143 from tchaikov/wip-mgr-disable-dne-module

mon/MgrMonitor: show different error message when disabling a dne module

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
5 years agoMerge pull request #34366 from SUSE/wip-mgr-fix-python-traceback
Kefu Chai [Wed, 8 Apr 2020 07:29:34 +0000 (15:29 +0800)]
Merge pull request #34366 from SUSE/wip-mgr-fix-python-traceback

mgr/PyModule: fix missing tracebacks in handle_pyerror()

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34337 from majianpeng/throttle-remove-lock
Kefu Chai [Wed, 8 Apr 2020 07:28:04 +0000 (15:28 +0800)]
Merge pull request #34337 from majianpeng/throttle-remove-lock

common/Throttle: Don't lock for atomic type update.

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34381 from rhcs-dashboard/fix-44721-master
Kefu Chai [Wed, 8 Apr 2020 07:25:22 +0000 (15:25 +0800)]
Merge pull request #34381 from rhcs-dashboard/fix-44721-master

rpm: add python3-saml as install dependency

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34409 from adamemerson/wip-namespace-osd
Kefu Chai [Wed, 8 Apr 2020 07:20:22 +0000 (15:20 +0800)]
Merge pull request #34409 from adamemerson/wip-namespace-osd

osd: build without `using namespace` declarations in headers

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34460 from majianpeng/cmakefile-fix
Kefu Chai [Wed, 8 Apr 2020 07:07:00 +0000 (15:07 +0800)]
Merge pull request #34460 from majianpeng/cmakefile-fix

cmake: remove duplicated code.

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34451 from tchaikov/wip-standalone-pgid
Kefu Chai [Wed, 8 Apr 2020 04:50:47 +0000 (12:50 +0800)]
Merge pull request #34451 from tchaikov/wip-standalone-pgid

qa/standalone/scrub: s/$(pgid)/${pgid}/

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoqa/tasks/ceph_objectstore_tool.py: use str.startswit
Kefu Chai [Wed, 8 Apr 2020 04:32:54 +0000 (12:32 +0800)]
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>
5 years agoMerge pull request #34245 from rzarzynski/wip-bug-24995
Kefu Chai [Wed, 8 Apr 2020 03:55:59 +0000 (11:55 +0800)]
Merge pull request #34245 from rzarzynski/wip-bug-24995

mgr: synchronize ClusterState's health and mon_status.

Reviewed-by: Tim Serong <tserong@suse.com>
5 years agocmake: remove duplicated code. 34460/head
Jianpeng Ma [Wed, 8 Apr 2020 03:08:02 +0000 (11:08 +0800)]
cmake: remove duplicated code.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
5 years agotest/rgw: upload using a NamedTemporaryFile
Kefu Chai [Wed, 8 Apr 2020 02:50:21 +0000 (10:50 +0800)]
test/rgw: upload using a NamedTemporaryFile

in boto, it tries to figure out the MIME type of a file by its name, if
the file-like objects has an attribute of "name". in Python2, the "name"
is always "<fdopen>", fortunately. while in Python3, `TemporaryFile` also
have a "name" which is its fd, and it is an integer now. so we have following
error when sending a `TemporaryFile` using
`upload_part_from_file()`:
```
2020-04-08T02:25:34.660 INFO:tasks.rgw_multisite_tests:Traceback (most recent call last):
2020-04-08T02:25:34.661 INFO:tasks.rgw_multisite_tests:  File "/home/teuthworker/src/git.ceph.com_git_teuthology_wip-py3/virtualenv/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
2020-04-08T02:25:34.661 INFO:tasks.rgw_multisite_tests:    self.test(*self.arg)
2020-04-08T02:25:34.662 INFO:tasks.rgw_multisite_tests:  File "/home/teuthworker/src/github.com_tchaikov_ceph_wip-qa-py3/qa/tasks/rgw_multi/tests_ps.py", line 2567, in test_ps_creation_triggers
2020-04-08T02:25:34.662 INFO:tasks.rgw_multisite_tests:    uploader.upload_part_from_file(fp, 1)
2020-04-08T02:25:34.663 INFO:tasks.rgw_multisite_tests:  File "/home/teuthworker/src/git.ceph.com_git_teuthology_wip-py3/virtualenv/lib/python3.5/site-packages/boto/s3/multipart.py", line 260, in upload_part_from_file
2020-04-08T02:25:34.663 INFO:tasks.rgw_multisite_tests:    query_args=query_args, size=size)
2020-04-08T02:25:34.664 INFO:tasks.rgw_multisite_tests:  File "/home/teuthworker/src/git.ceph.com_git_teuthology_wip-py3/virtualenv/lib/python3.5/site-packages/boto/s3/key.py", line 1293, in set_contents_from_file
2020-04-08T02:25:34.664 INFO:tasks.rgw_multisite_tests:    chunked_transfer=chunked_transfer, size=size)
2020-04-08T02:25:34.664 INFO:tasks.rgw_multisite_tests:  File "/home/teuthworker/src/git.ceph.com_git_teuthology_wip-py3/virtualenv/lib/python3.5/site-packages/boto/s3/key.py", line 750, in send_file
2020-04-08T02:25:34.665 INFO:tasks.rgw_multisite_tests:    chunked_transfer=chunked_transfer, size=size)
2020-04-08T02:25:34.665 INFO:tasks.rgw_multisite_tests:  File "/home/teuthworker/src/git.ceph.com_git_teuthology_wip-py3/virtualenv/lib/python3.5/site-packages/boto/s3/key.py", line 920, in
_send_file_internal
2020-04-08T02:25:34.666 INFO:tasks.rgw_multisite_tests:    self.content_type = mimetypes.guess_type(self.path)[0]
2020-04-08T02:25:34.666 INFO:tasks.rgw_multisite_tests:  File "/usr/lib/python3.5/mimetypes.py", line 289, in guess_type
2020-04-08T02:25:34.667 INFO:tasks.rgw_multisite_tests:    return _db.guess_type(url, strict)
2020-04-08T02:25:34.667 INFO:tasks.rgw_multisite_tests:  File "/usr/lib/python3.5/mimetypes.py", line 114, in guess_type
2020-04-08T02:25:34.667 INFO:tasks.rgw_multisite_tests:    scheme, url = urllib.parse.splittype(url)
2020-04-08T02:25:34.668 INFO:tasks.rgw_multisite_tests:  File "/usr/lib/python3.5/urllib/parse.py", line 881, in splittype
2020-04-08T02:25:34.668 INFO:tasks.rgw_multisite_tests:    match = _typeprog.match(url)
2020-04-08T02:25:34.669 INFO:tasks.rgw_multisite_tests:TypeError: expected string or bytes-like object
```

to address this issue, in this change, a `NamedTemporaryFile` is used
instead of `TemporaryFile`. the former does have a "name" which is a
`str`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoqa/standalone/scrub: s/$(pgid)/${pgid}/
Kefu Chai [Tue, 7 Apr 2020 16:53:55 +0000 (00:53 +0800)]
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>
5 years agoqa/tasks/ceph_manager.py: do not return a filter
Kefu Chai [Tue, 7 Apr 2020 16:45:49 +0000 (00:45 +0800)]
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>
5 years agoMerge pull request #34368 from majianpeng/msg-remove-unsued-code
Kefu Chai [Wed, 8 Apr 2020 01:59:51 +0000 (09:59 +0800)]
Merge pull request #34368 from majianpeng/msg-remove-unsued-code

msg, common/Throttle: remove unsued code.

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34369 from smithfarm/wip-43895
Kefu Chai [Wed, 8 Apr 2020 01:57:04 +0000 (09:57 +0800)]
Merge pull request #34369 from smithfarm/wip-43895

cmake: really stop at top of source code tree

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34383 from matthewoliver/older-tox
Kefu Chai [Wed, 8 Apr 2020 01:56:24 +0000 (09:56 +0800)]
Merge pull request #34383 from matthewoliver/older-tox

tox: Fix the tox.ini's to support older versions of tox

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge pull request #34427 from smithfarm/wip-44964
Kefu Chai [Wed, 8 Apr 2020 01:54:33 +0000 (09:54 +0800)]
Merge pull request #34427 from smithfarm/wip-44964

spec: address some warnings raised by RPM 4.15.1

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #33945 from rishabh-d-dave/fs-qa-vstart_runner.LocalRemote.sh
Kefu Chai [Wed, 8 Apr 2020 01:53:32 +0000 (09:53 +0800)]
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>
5 years agoMerge pull request #34456 from ceph/wip-crontab-master
Yuri Weinstein [Wed, 8 Apr 2020 00:29:05 +0000 (17:29 -0700)]
Merge pull request #34456 from ceph/wip-crontab-master

qa/tests: removed ceph-deploy from master and octopus (ceph-deploy is…

5 years agoqa/tests: removed ceph-deploy from master and octopus (ceph-deploy isn't written... 34456/head
yuriw [Tue, 7 Apr 2020 23:47:56 +0000 (16:47 -0700)]
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>
5 years agoMerge pull request #34439 from jschmid1/osdspec_encrypted_docs
Sebastian Wagner [Tue, 7 Apr 2020 22:01:59 +0000 (00:01 +0200)]
Merge pull request #34439 from jschmid1/osdspec_encrypted_docs

docs/cephadm: <encrypted> is a global flag

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge pull request #34053 from matthewoliver/iscsi-cephadm
Sebastian Wagner [Tue, 7 Apr 2020 21:49:06 +0000 (23:49 +0200)]
Merge pull request #34053 from matthewoliver/iscsi-cephadm

cephadm: Add ceph-iscsi

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge pull request #34357 from mgfritch/mgr-orch-test-warn
Sebastian Wagner [Tue, 7 Apr 2020 21:48:32 +0000 (23:48 +0200)]
Merge pull request #34357 from mgfritch/mgr-orch-test-warn

mgr/orch: fix python3 DeprecationWarning

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoqa/workunits/cephadm/test_cephadm.sh: add fsid to ceph-volume cmds
Michael Fritch [Tue, 7 Apr 2020 21:27:35 +0000 (15:27 -0600)]
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>
5 years agomgr/dashboard: use FQDN for failover redirection 34452/head
Ernesto Puerta [Tue, 7 Apr 2020 17:02:09 +0000 (19:02 +0200)]
mgr/dashboard: use FQDN for failover redirection

Fixes: https://tracker.ceph.com/issues/44923
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
5 years agoqa/standalone/scrub: s/$(pgid)/${pgid}/ 34451/head
Kefu Chai [Tue, 7 Apr 2020 16:53:55 +0000 (00:53 +0800)]
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>
5 years agomgr/dashboard: fix errors related to frontend service subscriptions. 34058/head
Alfonso Martínez [Tue, 7 Apr 2020 16:07:54 +0000 (18:07 +0200)]
mgr/dashboard: fix errors related to frontend service subscriptions.

- Created TimerService: for getting a scheduled observable that checks if there are any observers subscribed before sending a request.
Now FeatureTogglesService uses it internally (solving a hidden bug in it).
- SummaryService & RbdMirroringService: instead of having window.setInterval/setTimeout tasks launched in constructor, now they have a method for polling (and subscribing to it). These methods are called in the appropriate component so we unsubscribe properly.
- Fixed: some subscriptions were not being unsubscribed properly.
- RbdFormComponent: little refactoring and fixed (also improved) unit tests.

Fixes: https://tracker.ceph.com/issues/44228
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
5 years agorpm: add python3-saml as install dependency 34381/head
Ernesto Puerta [Thu, 2 Apr 2020 16:26:40 +0000 (18:26 +0200)]
rpm: add python3-saml as install dependency

`python.*-saml` is required for Ceph-Dashboard SSO support (optional
feature).

Fixes: https://tracker.ceph.com/issues/44721
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
5 years agoqa/tasks/cephadm.py: decode data returned by teuthology.get_file()
Kefu Chai [Tue, 7 Apr 2020 15:05:30 +0000 (23:05 +0800)]
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>
5 years agomgr/dashboard: Clean up HTML 34314/head
Ishan Rai [Tue, 31 Mar 2020 11:25:14 +0000 (16:55 +0530)]
mgr/dashboard: Clean up HTML

cleaned up BootstrapCreateModalComponent and footers

Fixes: https://tracker.ceph.com/issues/44848
Signed-off-by: Ishan Rai <ishanrai05@gmail.com>
5 years agoMerge pull request #34396 from tspmelo/wip-npm-hacking
Lenz Grimmer [Tue, 7 Apr 2020 13:54:39 +0000 (15:54 +0200)]
Merge pull request #34396 from tspmelo/wip-npm-hacking

mgr/dashboard: Update HACKING.rst

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
5 years agotest/rgw/rgw_multi: return (str, int) from make_request()
Kefu Chai [Tue, 7 Apr 2020 13:22:36 +0000 (21:22 +0800)]
test/rgw/rgw_multi: return (str, int) from make_request()

so its consumer can feed the returned str to json.loads()

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoqa/tasks/mgr: s/urllib.quote_plus/parse.quote_plus/
Kefu Chai [Tue, 7 Apr 2020 12:27:08 +0000 (20:27 +0800)]
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>
5 years agotest/rgw/rgw_multi: s/urllib.urlencode/urlparse.urlencode/
Kefu Chai [Tue, 7 Apr 2020 12:00:52 +0000 (20:00 +0800)]
test/rgw/rgw_multi: s/urllib.urlencode/urlparse.urlencode/

urllib in python3 does not offer urlencode anymore, so let's use
six.moves.parse now.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agotest/rgw/rgw_multi: pass bytes to hmac.new()
Kefu Chai [Tue, 7 Apr 2020 05:29:27 +0000 (13:29 +0800)]
test/rgw/rgw_multi: pass bytes to hmac.new()

in Python3, `key` passed to `hmac.new()` should be bytes or bytearray

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoqa/tasks/radosgw_admin.py: coerce key.name and key.acl to str
Kefu Chai [Mon, 6 Apr 2020 16:51:12 +0000 (00:51 +0800)]
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>
5 years agotest/rgw/rgw_multi/tests.py: decode retval of bucket.get_policy()
Kefu Chai [Mon, 6 Apr 2020 15:20:32 +0000 (23:20 +0800)]
test/rgw/rgw_multi/tests.py: decode retval of bucket.get_policy()

return value of bucket.get_policy() is a bytes, so we need to decode it
before comparing it with a string, since the content of policy is ASCII,
it'd be suffice to decode it with 'ascii'.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agotest/rgw: pass encoding to Key.get_content_as_string()
Kefu Chai [Mon, 6 Apr 2020 15:11:21 +0000 (23:11 +0800)]
test/rgw: 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>
5 years agoqa/tasks: pass encoding to Key.get_content_as_string()
Kefu Chai [Mon, 6 Apr 2020 15:08:59 +0000 (23:08 +0800)]
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>
5 years agoqa/tasks/s3tests_java.py: do not change a dict while iterating it
Kefu Chai [Mon, 6 Apr 2020 14:41:10 +0000 (22:41 +0800)]
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>
5 years agoqa/tasks/ragweed.py: open file in text mode
Kefu Chai [Mon, 6 Apr 2020 13:14:36 +0000 (21:14 +0800)]
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>
5 years agoqa,test: decode return val of base64.b64encode()
Kefu Chai [Mon, 6 Apr 2020 10:55:53 +0000 (18:55 +0800)]
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>
5 years agoqa/tasks/barbican.py: convert to str before json.loads()
Kefu Chai [Mon, 6 Apr 2020 09:36:18 +0000 (17:36 +0800)]
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>
5 years agoqa/tasks/radosgw_admin.py: do not use dict.has_keys()
Kefu Chai [Mon, 6 Apr 2020 08:55:05 +0000 (16:55 +0800)]
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>
5 years agoqa/tasks/tempest.py: always write str is value of options
Kefu Chai [Mon, 6 Apr 2020 08:37:55 +0000 (16:37 +0800)]
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>
5 years agoqa/tasks/tempest.py: use configparser from six.moves
Kefu Chai [Mon, 6 Apr 2020 07:18:51 +0000 (15:18 +0800)]
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>
5 years agoqa/tasks/ragweed.py: use str methods of helper from string module
Kefu Chai [Mon, 6 Apr 2020 07:12:46 +0000 (15:12 +0800)]
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>
5 years agotest/rgw/rgw_multi: do not decode a str
Kefu Chai [Mon, 6 Apr 2020 07:03:22 +0000 (15:03 +0800)]
test/rgw/rgw_multi: do not decode a str

`s` comes from `rgwadmin()`, which passes `StringIO` as stdout, so the
the output should an instance of `str` in both Python2 and Python3.
hence there is no need to decode it using UTF-8 codecs again.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoqa/tasks/radosgw_admin: use HTTPMessage as a dict in PY3
Kefu Chai [Mon, 6 Apr 2020 06:52:02 +0000 (14:52 +0800)]
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>