]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agorgw: convert string constant to string_view 37125/head
Kefu Chai [Sun, 13 Sep 2020 15:12:02 +0000 (23:12 +0800)]
rgw: convert string constant to string_view

instead of converting string constant to char*, construct string_views
from string constants

to silence GCC warnings like:

src/rgw/services/svc_sys_obj_cache.cc:512:7: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
  512 |     { "cache list name=filter,type=CephString,req=false",
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37097 from tchaikov/wip-buffer-offsetof
Kefu Chai [Sat, 12 Sep 2020 15:13:39 +0000 (23:13 +0800)]
Merge pull request #37097 from tchaikov/wip-buffer-offsetof

common/buffer: use homebrew BUF_OFFSETOF to replace offsetof()

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoMerge pull request #37117 from bstillwell/zstd-upgrade-v1_4_5
Kefu Chai [Sat, 12 Sep 2020 15:12:36 +0000 (23:12 +0800)]
Merge pull request #37117 from bstillwell/zstd-upgrade-v1_4_5

zstd: upgrade to v1.4.5

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37096 from majianpeng/osd-pg-remove-unused-ocde
Kefu Chai [Sat, 12 Sep 2020 11:31:13 +0000 (19:31 +0800)]
Merge pull request #37096 from majianpeng/osd-pg-remove-unused-ocde

osd/PG: remove unused function.

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #36918 from tchaikov/wip-pybind-type-annotations
Kefu Chai [Fri, 11 Sep 2020 22:49:58 +0000 (06:49 +0800)]
Merge pull request #36918 from tchaikov/wip-pybind-type-annotations

pybind/rados: use PEP484 style type annotations

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #37105 from tchaikov/wip-47404
Kefu Chai [Fri, 11 Sep 2020 22:27:51 +0000 (06:27 +0800)]
Merge pull request #37105 from tchaikov/wip-47404

mgr/zabbix: indent the output of "zabbix config-show"

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #37012 from trociny/wip-46803
Jason Dillaman [Fri, 11 Sep 2020 22:14:46 +0000 (18:14 -0400)]
Merge pull request #37012 from trociny/wip-46803

librbd: track complete async operation requests

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agozstd: upgrade to v1.4.5 37117/head
Bryan Stillwell [Fri, 11 Sep 2020 21:49:39 +0000 (15:49 -0600)]
zstd: upgrade to v1.4.5

Since the v1.4.0 release there have been a few improvements to Zstandard
including improved compression ratios, faster compression, and faster
decompression.

Signed-off-by: Bryan Stillwell <bstillwell@godaddy.com>
4 years agoMerge pull request #37114 from yuriw/wip-yuriw-crontab-master
Josh Durgin [Fri, 11 Sep 2020 21:42:24 +0000 (14:42 -0700)]
Merge pull request #37114 from yuriw/wip-yuriw-crontab-master

qa/tests: running rados with -p 80 to produce better test results on …

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #35543 from sebastian-philipp/qa-cephadm-iscsi
Sebastian Wagner [Fri, 11 Sep 2020 19:10:37 +0000 (21:10 +0200)]
Merge pull request #35543 from sebastian-philipp/qa-cephadm-iscsi

qa/cephadm: Add iSCSI

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Georgios Kyratsas <gkyratsas@suse.com>
Reviewed-by: Matthew Oliver <moliver@suse.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
4 years agoMerge pull request #36936 from mgfritch/cephadm-keyring-rm
Sebastian Wagner [Fri, 11 Sep 2020 19:09:19 +0000 (21:09 +0200)]
Merge pull request #36936 from mgfritch/cephadm-keyring-rm

mgr/cephadm: remove keyring during daemon post-remove

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #32581 from rishabh-d-dave/wip-djf-15070
Ramana Raja [Fri, 11 Sep 2020 18:30:52 +0000 (00:00 +0530)]
Merge pull request #32581 from rishabh-d-dave/wip-djf-15070

mon, cephfs: Add auth caps for CephFS fsids

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoqa/tests: running rados with -p 80 to produce better test results on master 37114/head
Yuri Weinstein [Fri, 11 Sep 2020 17:49:35 +0000 (10:49 -0700)]
qa/tests: running rados with -p 80 to produce better test results on master

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoMerge pull request #37021 from tchaikov/wip-osd-pass-by-ref
Kefu Chai [Fri, 11 Sep 2020 17:38:09 +0000 (01:38 +0800)]
Merge pull request #37021 from tchaikov/wip-osd-pass-by-ref

osd: pass pg_log_t by lvalue reference

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #37011 from tchaikov/wip-rgw-cache-list
Casey Bodley [Fri, 11 Sep 2020 17:04:00 +0000 (13:04 -0400)]
Merge pull request #37011 from tchaikov/wip-rgw-cache-list

rgw: set command desc for "cache list"

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #37002 from tchaikov/wip-alpine-cleanup
Kefu Chai [Fri, 11 Sep 2020 16:43:36 +0000 (00:43 +0800)]
Merge pull request #37002 from tchaikov/wip-alpine-cleanup

alpine: remove .editorconfig

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agopybind/rados: do not encode bytes 36918/head
Kefu Chai [Fri, 4 Sep 2020 03:44:38 +0000 (11:44 +0800)]
pybind/rados: do not encode bytes

the annotations ensures the type of input parameter, so no need to
encode a bytes object anymore

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoceph.in: read bytes from stdin
Kefu Chai [Fri, 4 Sep 2020 02:21:35 +0000 (10:21 +0800)]
ceph.in: read bytes from stdin

the data read from stdin is used as the input parameter for calls like
`cluster.osd_command(...)` and `cluster.mon_command`. all of them
expect a bytes `inbuf`. in Python2, this sys.stdin.read() returns a str,
and we don't differentiate str from byte back then. but we need enforce
the type now for better readablity and type correctness.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agotest/pybind: pass a str to "ping_monitor()"
Kefu Chai [Thu, 3 Sep 2020 16:26:09 +0000 (00:26 +0800)]
test/pybind: pass a str to "ping_monitor()"

monitors' names are not numbers, they are referenced by names in
general. their ranks are numbers though, but that's different story.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: define unicode alias
Kefu Chai [Tue, 1 Sep 2020 13:53:10 +0000 (21:53 +0800)]
pybind/rados: define unicode alias

for silencing warnings like:

WARNING: Cannot resolve forward reference in type annotations of "rados.Rados.conf_get": name 'unicode' is not defined

because cython < 3.0 with language_level = "3", translates "str" to "unicode"
to be python2 compatible, but we've migrated to python3. and the specified
"language_level" is "3'. see also
https://github.com/cython/cython/issues/1370

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: drop redundant type in docstring
Kefu Chai [Tue, 1 Sep 2020 12:54:28 +0000 (20:54 +0800)]
pybind/rados: drop redundant type in docstring

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: remove duplicated statement
Kefu Chai [Tue, 1 Sep 2020 12:46:09 +0000 (20:46 +0800)]
pybind/rados: remove duplicated statement

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind: s/unicode/str/
Kefu Chai [Tue, 1 Sep 2020 12:38:46 +0000 (20:38 +0800)]
pybind: s/unicode/str/

we've migrated to python3, so no "unicode" anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: use PEP484 style type annotations
Kefu Chai [Tue, 1 Sep 2020 08:16:31 +0000 (16:16 +0800)]
pybind/rados: use PEP484 style type annotations

* use PEP484 style typo annotations
* drop homebrew `requires()` decorator
* drop tests for `requires()` decorator
* add test for type annotations

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/ceph_argparse.py: pass a str not a list to mon_command()
Kefu Chai [Tue, 1 Sep 2020 08:10:54 +0000 (16:10 +0800)]
pybind/ceph_argparse.py: pass a str not a list to mon_command()

no need to construct a list as the cmd. and more importantly,

the document of Rados.mon_command() reads:

  Rados.mon_command(self, cmd, inbuf, timeout=0, target=None):
  ...
  :param cmd: JSON formatted string.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: construct cmd as an array of a single entry
Kefu Chai [Tue, 1 Sep 2020 05:07:17 +0000 (13:07 +0800)]
pybind/rados: construct cmd as an array of a single entry

otherwise what monitor receives would be something like

mon_command({ " p r e f i x " :   " o s d   m a p " ...

difficult to parse/grep by machine/human.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: add type annotations to Rados.mon_command()
Kefu Chai [Tue, 1 Sep 2020 05:02:15 +0000 (13:02 +0800)]
pybind/rados: add type annotations to Rados.mon_command()

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37052 from cbodley/wip-rgw-rest-op-err
Casey Bodley [Fri, 11 Sep 2020 15:33:11 +0000 (11:33 -0400)]
Merge pull request #37052 from cbodley/wip-rgw-rest-op-err

rgw: RGWRESTOp no longer tracks separate error code

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agomgr/cephadm: merge update_keyring_caps -> create_keyring 36936/head
Michael Fritch [Fri, 11 Sep 2020 14:10:44 +0000 (08:10 -0600)]
mgr/cephadm: merge update_keyring_caps -> create_keyring

keyring is removed during daemon remove, which obsoletes the need to
update the keyring caps after get-or-create

Signed-off-by: Michael Fritch <mfritch@suse.com>
4 years agomgr/cephadm: disallow removing the mon keyring
Michael Fritch [Fri, 11 Sep 2020 14:10:38 +0000 (08:10 -0600)]
mgr/cephadm: disallow removing the mon keyring

Signed-off-by: Michael Fritch <mfritch@suse.com>
4 years agomgr/cephadm: remove keyring during daemon post-remove
Michael Fritch [Fri, 11 Sep 2020 14:10:32 +0000 (08:10 -0600)]
mgr/cephadm: remove keyring during daemon post-remove

Fixes: https://tracker.ceph.com/issues/47298
Signed-off-by: Michael Fritch <mfritch@suse.com>
4 years agomgr/cephadm: pass `DaemonDescription` during pre/post remove
Michael Fritch [Fri, 11 Sep 2020 14:10:26 +0000 (08:10 -0600)]
mgr/cephadm: pass `DaemonDescription` during pre/post remove

add more context than simply passing the `daemon_id`

Signed-off-by: Michael Fritch <mfritch@suse.com>
4 years agomgr/cephadm: add `post_remove` daemon action
Michael Fritch [Fri, 11 Sep 2020 14:10:17 +0000 (08:10 -0600)]
mgr/cephadm: add `post_remove` daemon action

invoked after a daemon has been removed

Signed-off-by: Michael Fritch <mfritch@suse.com>
4 years agolibrbd: track complete async operation requests 37012/head
Mykola Golub [Sun, 6 Sep 2020 12:48:53 +0000 (13:48 +0100)]
librbd: track complete async operation requests

to prevent duplicate maintenance operations due to RPC hiccups.

Fixes: https://tracker.ceph.com/issues/46803
Signed-off-by: Mykola Golub <mgolub@suse.com>
4 years agoMerge pull request #36825 from trociny/wip-47068
Jason Dillaman [Fri, 11 Sep 2020 13:25:57 +0000 (09:25 -0400)]
Merge pull request #36825 from trociny/wip-47068

librbd: task finisher should distinguish quiesce tasks with different ID

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoqa/cephfs: add tests for "fs authorize" subcommand 32581/head
Rishabh Dave [Mon, 24 Aug 2020 18:52:20 +0000 (00:22 +0530)]
qa/cephfs: add tests for "fs authorize" subcommand

Make caps FS-specific affects "fs authorize" subcommand. Let's add few
tests to verify its behaviour.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoqa/cephfs: backup mount object before running tests
Rishabh Dave [Mon, 24 Aug 2020 18:34:40 +0000 (00:04 +0530)]
qa/cephfs: backup mount object before running tests

Right now, only client IDs are stashed and restored but with the recent
changes (addition of more attributes to mount objects, specifically),
this is not enough. Saving and restoring these details before and after
tests respectively ensures that mount commands rus smoothly. Not doing
this typically leads to mount command failure for the second test in the
testsuite under execution since the client IDs are saved and restored in
CephFSTestCase.setUp and CephFSTestCase.tearDown respectively but the
rest of the details are not.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoqa/cephfs: add tests for multi-FS auth tests
Rishabh Dave [Mon, 27 Jan 2020 06:01:40 +0000 (11:31 +0530)]
qa/cephfs: add tests for multi-FS auth tests

Add testsuite for testing authorization on Ceph cluster with multiple
file systems and enable it to be executable with Teuthology framework.

Also add helper methods required to setup the test environment for
multi-FS tests.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agomgr/zabbix: indent the output of "zabbix config-show" 37105/head
Kefu Chai [Fri, 11 Sep 2020 12:29:56 +0000 (20:29 +0800)]
mgr/zabbix: indent the output of "zabbix config-show"

Fixes: https://tracker.ceph.com/issues/47404
Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomgr/cephadm: allow iscsi to be named by teuthology 35543/head
Sebastian Wagner [Fri, 11 Sep 2020 12:18:54 +0000 (14:18 +0200)]
mgr/cephadm: allow iscsi to be named by teuthology

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoqa/cephadm: Also fetch iscsi logs
Sebastian Wagner [Wed, 1 Jul 2020 09:03:20 +0000 (11:03 +0200)]
qa/cephadm: Also fetch iscsi logs

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoqa/cephadm: Add iSCSI
Sebastian Wagner [Thu, 11 Jun 2020 14:11:29 +0000 (16:11 +0200)]
qa/cephadm: Add iSCSI

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #37094 from adk3798/iscsi-m
Sebastian Wagner [Fri, 11 Sep 2020 12:09:52 +0000 (14:09 +0200)]
Merge pull request #37094 from adk3798/iscsi-m

cephadm: remove z option from iSCSI dev and configfs mount

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #37084 from tchaikov/wip-crimson-fmt
Kefu Chai [Fri, 11 Sep 2020 11:37:12 +0000 (19:37 +0800)]
Merge pull request #37084 from tchaikov/wip-crimson-fmt

crimson/osd: fix fmt::format() errors and cleanups

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoMerge pull request #37099 from tchaikov/wip-crimson-cause-sv
Kefu Chai [Fri, 11 Sep 2020 10:55:04 +0000 (18:55 +0800)]
Merge pull request #37099 from tchaikov/wip-crimson-cause-sv

crimson/osd: pass the the cause by string_view

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoMerge pull request #37031 from sseshasa/wip-pgpush-recovery-class
Sridhar Seshasayee [Fri, 11 Sep 2020 09:36:04 +0000 (15:06 +0530)]
Merge pull request #37031 from sseshasa/wip-pgpush-recovery-class

osd: Introduce new PGOpQueueable class for recovery push/reply messages.

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
4 years agoMerge pull request #36745 from ifed01/wip-ifed-bluefs-remove-obsolete
Kefu Chai [Fri, 11 Sep 2020 09:13:25 +0000 (17:13 +0800)]
Merge pull request #36745 from ifed01/wip-ifed-bluefs-remove-obsolete

os/bluestore: get rid of obsolete stuff in bluefs.

Reviewed-by: Adam Kupczyk <akucpzyk@redhat.com>
4 years agoMerge pull request #36822 from sebastian-philipp/cephadm-container-init
Sebastian Wagner [Fri, 11 Sep 2020 09:12:21 +0000 (11:12 +0200)]
Merge pull request #36822 from sebastian-philipp/cephadm-container-init

cephadm: Add --container-init

4 years agoMerge pull request #36211 from kshtsk/wip-remote-write-file
Kefu Chai [Fri, 11 Sep 2020 09:11:10 +0000 (17:11 +0800)]
Merge pull request #36211 from kshtsk/wip-remote-write-file

qa/tasks: use remote write file

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37029 from tchaikov/wip-pybind-finer-grainer-test
Kefu Chai [Fri, 11 Sep 2020 09:10:43 +0000 (17:10 +0800)]
Merge pull request #37029 from tchaikov/wip-pybind-finer-grainer-test

test/pybind: split aio_test into smaller pieces

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #32169 from zjcmszh/cmpext_op
Kefu Chai [Fri, 11 Sep 2020 09:09:47 +0000 (17:09 +0800)]
Merge pull request #32169 from zjcmszh/cmpext_op

pybind: add aio_cmpext()

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37036 from changchengx/unused_var
Kefu Chai [Fri, 11 Sep 2020 09:06:44 +0000 (17:06 +0800)]
Merge pull request #37036 from changchengx/unused_var

common: remove data_dir_option in func global_init

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: pass the the cause by string_view 37099/head
Kefu Chai [Fri, 11 Sep 2020 08:43:37 +0000 (16:43 +0800)]
crimson/osd: pass the the cause by string_view

in future, string_view can be used almost every where string can be
used. in this change, `const char*` is instead passed to the constructor
of system_error, as we can ensure that the string_view instances are
always constructed from a `const char*` ended with `\0`.

we need this change for two reasons:

* better performance
* prefer for the world where string_view rules.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocommon/buffer: use homebrew BUF_OFFSETOF to replace offsetof() 37097/head
Kefu Chai [Fri, 11 Sep 2020 04:53:28 +0000 (12:53 +0800)]
common/buffer: use homebrew BUF_OFFSETOF to replace offsetof()

because buffer::raw is not a standard layout type. so `offsetof()`
does not always work. let's use a homebrew macro to calculate the
address of `bptr_storage`.

this change silences the warning like:

src/common/buffer.cc:2156:15: warning: ‘offsetof’ within non-standard-layout type ‘ceph::buffer::v15_2_0::raw’ is conditionally-supported [-Winvalid-offsetof]
 2156 |      offsetof(buffer::raw, bptr_storage));

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoosd/PG: remove unused function. 37096/head
Jianpeng Ma [Fri, 11 Sep 2020 03:08:17 +0000 (11:08 +0800)]
osd/PG: remove unused function.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
4 years agocephadm: remove z option from iSCSI dev and configfs mount 37094/head
Adam King [Fri, 4 Sep 2020 12:06:37 +0000 (08:06 -0400)]
cephadm: remove z option from iSCSI dev and configfs mount

selinux complains if you try to deploy iSCSI with the z option
on the /dev and /sys/kernel/config mounts

Signed-off-by: Adam King <adking@redhat.com>
4 years agoMerge pull request #36935 from mgfritch/cephadm-ceph-service
Sebastian Wagner [Thu, 10 Sep 2020 22:13:10 +0000 (00:13 +0200)]
Merge pull request #36935 from mgfritch/cephadm-ceph-service

mgr/cephadm: introduce `CephService` class

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #37070 from zdover23/wip-doc-3-hacking-into-docs
zdover23 [Thu, 10 Sep 2020 22:04:24 +0000 (08:04 +1000)]
Merge pull request #37070 from zdover23/wip-doc-3-hacking-into-docs

doc/dev: add HACKING.rst to Dev Guide

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #37089 from cbodley/wip-cmake-osd-fifo
Casey Bodley [Thu, 10 Sep 2020 18:52:27 +0000 (14:52 -0400)]
Merge pull request #37089 from cbodley/wip-cmake-osd-fifo

cmake: add cls_fifo as a dependency of osd

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-by: Ali Maredia <amaredia@redhat.com>
4 years agoqa/cephfs: add methods to read/write on CephFS mounts
Rishabh Dave [Wed, 1 Apr 2020 11:21:06 +0000 (16:51 +0530)]
qa/cephfs: add methods to read/write on CephFS mounts

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoqa/cephfs: modify delete_all_filesystems() in filesystem.py
Rishabh Dave [Wed, 24 Jun 2020 13:30:56 +0000 (19:00 +0530)]
qa/cephfs: modify delete_all_filesystems() in filesystem.py

Modify filesystem.Filesystem.delete_all_filesystems() method to make it
more succinct, move it to class MDSCluster instead and update every call
to it accordingly.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #36980 from adk3798/fix-iscsi
Sebastian Wagner [Thu, 10 Sep 2020 18:02:03 +0000 (20:02 +0200)]
Merge pull request #36980 from adk3798/fix-iscsi

cephadm: fix iSCSI unit.run file

Reviewed-by: Matthew Oliver <moliver@suse.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
4 years agoMerge pull request #36747 from varshar16/wip-doc-update-about-priority-check
Neha Ojha [Thu, 10 Sep 2020 17:29:29 +0000 (10:29 -0700)]
Merge pull request #36747 from varshar16/wip-doc-update-about-priority-check

doc/developer_guide: Update about '--force-priority' flag

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #36313 from changchengx/fix_warning
Casey Bodley [Thu, 10 Sep 2020 16:59:05 +0000 (12:59 -0400)]
Merge pull request #36313 from changchengx/fix_warning

rgw: fix vector index warning

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agocmake: add cls_fifo as a dependency of osd 37089/head
Casey Bodley [Thu, 10 Sep 2020 16:45:50 +0000 (12:45 -0400)]
cmake: add cls_fifo as a dependency of osd

otherwise cls_fifo is not built by 'make vstart'

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agorgw: RGWRESTOp no longer tracks separate error code 37052/head
Casey Bodley [Tue, 8 Sep 2020 17:53:36 +0000 (13:53 -0400)]
rgw: RGWRESTOp no longer tracks separate error code

RGWOp_Bucket_Remove::execute() was storing failures from
bucket->remove_bucket() in op_ret, but left http_ret=0 so we responded
to the client with '200 OK'

to avoid bugs like this, remove the extra http_ret variable and only use
the op_ret from RGWOp

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #37075 from tchaikov/wip-doc-dev
Kefu Chai [Thu, 10 Sep 2020 15:29:30 +0000 (23:29 +0800)]
Merge pull request #37075 from tchaikov/wip-doc-dev

doc/dev: fix broken link and fix the codeblocks' formatting

Reviewed-by: Zac Dover <zac.dover@gmail.com>
4 years agodoc/dev: add HACKING.rst to Dev Guide 37070/head
Zac Dover [Wed, 9 Sep 2020 13:08:29 +0000 (23:08 +1000)]
doc/dev: add HACKING.rst to Dev Guide

This commit exposes HACKING.rst through the
docs website. Formerly, HACKING.rst was just
a file that existed at /src/pybind/mgr/dashboard/
HACKING.rst. This commit also updates README.rst
to point to the new location of HACKING.rst.

Fixes: https://tracker.ceph.com/issues/47230
Signed-off-by: Zac Dover <zac.dover@gmail.com>
4 years agoMerge pull request #37071 from votdev/cleanup_servicespec_code
Sebastian Wagner [Thu, 10 Sep 2020 14:08:08 +0000 (16:08 +0200)]
Merge pull request #37071 from votdev/cleanup_servicespec_code

cephadm: Remove assignment to member variable in ServiceSpecs

Reviewed-by: Joshua Schmid <jschmid@suse.de>
4 years agoMerge PR #37046 into master
Sebastian Wagner [Thu, 10 Sep 2020 14:03:48 +0000 (16:03 +0200)]
Merge PR #37046 into master

* refs/pull/37046/head:
cephadm: unit.run: create /var/run/ceph/$FSID before doing anything else

Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agoMerge pull request #36766 from jmolmo/cephadm_log
Sebastian Wagner [Thu, 10 Sep 2020 13:44:17 +0000 (15:44 +0200)]
Merge pull request #36766 from jmolmo/cephadm_log

cephadm: log to file

4 years agocommon/dout: escape formatting string for crimson 37084/head
Kefu Chai [Thu, 10 Sep 2020 12:53:03 +0000 (20:53 +0800)]
common/dout: escape formatting string for crimson

crimson uses seastar logging facility for logging. and the latter uses
fmt::format(). currently, we collect the log message into a string and
pass it to log(fmt,...) as "fmt", but seastar/core/sstring.hh defines
the operator<<(ostream&, const vector<T>&) which is a better match than
our the operator<<(ostream&, const vector<T, Allocator>&). and seastar's
operator<<(ostream&, const vector<T>&) uses "{" and "}" to mark the
begin and end of a vector when printing it. and "{}" is also used by
libfmt to enclose its replacement fields. see
https://fmt.dev/latest/syntax.html. so when a vector is printed using
logging facility in crimson, libfmt chokes when trying to parse it as a
format string. so we have some options, like:

- disable seastar's operator<< implementation
- escape the "{}" when writing the vector to the output stream
- print the message as the args, and use "{}" as the fmt.

the 3rd one is the most straightforward, and probably more performant.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: use structured binding in loop
Kefu Chai [Thu, 10 Sep 2020 11:49:13 +0000 (19:49 +0800)]
crimson/osd: use structured binding in loop

use alias for accessing the elements for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: fix fmt::format() error
Kefu Chai [Thu, 10 Sep 2020 11:41:39 +0000 (19:41 +0800)]
crimson/osd: fix fmt::format() error

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: optimize the fast path of get_recovery_read()
Kefu Chai [Thu, 10 Sep 2020 11:38:02 +0000 (19:38 +0800)]
crimson/osd: optimize the fast path of get_recovery_read()

no need to enqueue if the lock can be acquired without waiting for it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocommon/config_proxy: add missing space
Kefu Chai [Thu, 10 Sep 2020 09:06:20 +0000 (17:06 +0800)]
common/config_proxy: add missing space

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #36798 from dang/wip-dang-zipper-8
Daniel Gryniewicz [Thu, 10 Sep 2020 12:29:00 +0000 (08:29 -0400)]
Merge pull request #36798 from dang/wip-dang-zipper-8

Wip dang zipper 8

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/cephfs: modify recreate() in filesystem.py
Rishabh Dave [Fri, 31 Jul 2020 08:57:16 +0000 (14:27 +0530)]
qa/cephfs: modify recreate() in filesystem.py

Modify cephfs.filesystem.Filesystem.recreate() method to delete only the
FS represented by the object instead of deleting the every FS on the
Ceph cluster.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoqa/cephfs: add a method to destroy fs in filesystem.py
Rishabh Dave [Wed, 24 Jun 2020 13:30:04 +0000 (19:00 +0530)]
qa/cephfs: add a method to destroy fs in filesystem.py

And reset_obj_attrs parameter to it so that the caller of the method can
choose to destroy the Ceph FS represented by the object without
disturbing the object attributes.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoqa/cephfs: allow not aborting execution when mount command fails
Rishabh Dave [Tue, 24 Mar 2020 11:34:14 +0000 (17:04 +0530)]
qa/cephfs: allow not aborting execution when mount command fails

This commit adds a new argument check_status to mount methods of
KernelMount, FuseMount, LocalKernelMount and LocalFuseMount. When value
of this argument is False, these methods would catch the
CommandFailedError exception and would return a tuple consisting of the
exception itself, and stdout and stderr of the mount command. This
allows reusing these mount methods while running negative tests for
commands.

The name "check_status" is selected so since teuthology's run() and
vstart_runner's run() use a variable with same name for the very same
purpose.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoqa/cephfs: allow reusing mount objects and add remount method
Rishabh Dave [Mon, 27 Jan 2020 06:07:44 +0000 (11:37 +0530)]
qa/cephfs: allow reusing mount objects and add remount method

This commit introduces following two set of changes -

First, make client keyring path, mountpoint on host FS and CephFS and
CephFS's name attributes of the object representing the mount
and update all the mount object creation calls accordingly. Also,
rewrite all the mount object creation to use keyword arguments instead
of positional arguments to avoid mistakes, especially since a new
argument was added in this commit.

Second, add remount method to mount.py so that it's possible to unmount
safely, modify the attributes of the object representing the mount and
mount again based on new state of the object *in a single call*. The
method is placed in mount.py to avoid duplication.

This change has two leads to two more changes: upgrading interface of
mount() and mount_wait() and upgrading testsuites to adapt to these
change.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agodoc/cephfs: add minor fixes for client-auth doc
Rishabh Dave [Thu, 16 Jul 2020 11:51:57 +0000 (17:21 +0530)]
doc/cephfs: add minor fixes for client-auth doc

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agomon/AuthMonitor: make fs authorize assign FS specific MON cap
Rishabh Dave [Fri, 24 Jul 2020 06:08:33 +0000 (11:38 +0530)]
mon/AuthMonitor: make fs authorize assign FS specific MON cap

So far running "fs authorize" subcommand sets "allow r" as MON cap;
change that to "allow <perms> fsname=<fsname>".

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agosrc/mds: allow passing fs names and path in same cap
Rishabh Dave [Tue, 17 Mar 2020 12:39:47 +0000 (18:09 +0530)]
src/mds: allow passing fs names and path in same cap

Allow passing path along with fs names and capspec while creating an MDS
cap. The new syntax looks as follows -

allow rw fsname=<fsname> path=<path>

To provide caps for multiple file systems, pass the same phrase multiple
times separated by commas -

allow rw fsname=<fsname1> path=<path1>, allow rw fsname=<fsname2>
path=<path2>, ...

This commit also makes sure that the old syntax 'allow rw path=<path>'
is supported for backwards compatibility. The old syntax would imply
'allow rw fsname=* path=<path>' and would grant read-write permission for
all FSs containing the path <path>.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agocephfs: add auth caps based on fs names
Douglas Fuller [Thu, 7 Mar 2019 15:17:23 +0000 (10:17 -0500)]
cephfs: add auth caps based on fs names

Add new auth caps to restrict access to clients based on fsnames. To
specify this, for example:

mds 'allow rw fsname=cephfs1'

This will restrict client access to fs name "cephfs1" only. Messages to
active MDS assigned to any other FSMap will be dropped. Standby MDS not
associated with an FSMap will accept messages from clients. To allow
multiple file systems, create MDS cap as follows -

mds 'allow rw fsname=cephfs1, allow rw fsname=cephfs2'

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agocephfs: store fs names associated with local MDSMap in MDSRank
Douglas Fuller [Thu, 7 Mar 2019 15:15:33 +0000 (10:15 -0500)]
cephfs: store fs names associated with local MDSMap in MDSRank

Modify MMDSMap to include the name of the file system from the FSMap
when bringing up a new MDS. Store the name in the MDSRank structure for
use in security validation.

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agomon/MDSMonitor: add mon auth caps for CephFS names
Douglas Fuller [Fri, 1 Mar 2019 16:41:45 +0000 (11:41 -0500)]
mon/MDSMonitor: add mon auth caps for CephFS names

Add a 'fsname' clause to mon auth caps to restrict a client's view
of the FSMap. Example:

mon 'allow rw fsname=cephfs2'

This would restrict the client's view of the FSMap to the MDSMap for
cephfs2. Any MDS allocated to a different filesystem will be invisible.
Global standby daemons are always visible. To allow multiple CephFSs,
add multiple caps:

mon 'allow rw fsname=cephfs2, allow rw fsname=cephfs2'

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #37039 from jan--f/c-v-no-fstrings
Jan Fajerski [Thu, 10 Sep 2020 11:34:44 +0000 (13:34 +0200)]
Merge pull request #37039 from jan--f/c-v-no-fstrings

ceph-volume: avoid format strings for now

4 years agoMerge pull request #36855 from yaarith/fix-devid-split
Kefu Chai [Thu, 10 Sep 2020 07:51:20 +0000 (15:51 +0800)]
Merge pull request #36855 from yaarith/fix-devid-split

mgr/telemetry: fix device id splitting when anonymizing serial

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoceph-volume: avoid format strings for now 37039/head
Jan Fajerski [Tue, 8 Sep 2020 07:34:00 +0000 (09:34 +0200)]
ceph-volume: avoid format strings for now

Fixes: https://tracker.ceph.com/issues/47354
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
4 years agoMerge pull request #37005 from tchaikov/wip-buffer-hyprcombine
Kefu Chai [Thu, 10 Sep 2020 07:49:55 +0000 (15:49 +0800)]
Merge pull request #37005 from tchaikov/wip-buffer-hyprcombine

common/buffer: check for null before deref

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agodoc/dev: reformat the sample for tree structure of a test suite 37075/head
Kefu Chai [Thu, 10 Sep 2020 06:33:50 +0000 (14:33 +0800)]
doc/dev: reformat the sample for tree structure of a test suite

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agodoc/dev: use appropriate directive for code blocks
Kefu Chai [Thu, 10 Sep 2020 06:09:18 +0000 (14:09 +0800)]
doc/dev: use appropriate directive for code blocks

* use "code-block:: yaml" for qa suite samples
* use "prompt:: bash $" for shell commands using a non-root user

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agodoc/dev: update supported distros of ceph
Kefu Chai [Thu, 10 Sep 2020 06:03:37 +0000 (14:03 +0800)]
doc/dev: update supported distros of ceph

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agodoc/dev: drop unused label
Kefu Chai [Thu, 10 Sep 2020 06:00:00 +0000 (14:00 +0800)]
doc/dev: drop unused label

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agodoc/dev: fix broken link
Kefu Chai [Thu, 10 Sep 2020 05:58:08 +0000 (13:58 +0800)]
doc/dev: fix broken link

otherwise "make check" would be a link pointing to
https://wiki.sepia.ceph.com/doku.php

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37050 from idryomov/wip-krbd-namespace-symlinks
Ilya Dryomov [Thu, 10 Sep 2020 06:04:10 +0000 (08:04 +0200)]
Merge pull request #37050 from idryomov/wip-krbd-namespace-symlinks

rbd: include RADOS namespace in krbd symlinks

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37073 from tchaikov/wip-crimson-test-config
Kefu Chai [Thu, 10 Sep 2020 05:43:13 +0000 (13:43 +0800)]
Merge pull request #37073 from tchaikov/wip-crimson-test-config

test/crimson: fix racing in testing

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agoMerge pull request #36961 from jdurgin/wip-auth-perf
Josh Durgin [Thu, 10 Sep 2020 05:12:52 +0000 (22:12 -0700)]
Merge pull request #36961 from jdurgin/wip-auth-perf

mon/AuthMonitor: speed up caps updates

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agocmake: add unittest_seastar_config as a ceph test 37073/head
Kefu Chai [Thu, 10 Sep 2020 03:53:08 +0000 (11:53 +0800)]
cmake: add unittest_seastar_config as a ceph test

Signed-off-by: Kefu Chai <kchai@redhat.com>