]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agoqa/mgr: revert a patch from commit 04ed58f 37233/head
Rishabh Dave [Fri, 18 Sep 2020 11:03:41 +0000 (16:33 +0530)]
qa/mgr: revert a patch from commit 04ed58f

mds_cluster.mds_fail() runs command "mds fail" not "fs fail". The reason
for failure was PR #32581 which accidentally changed the return code
from 0 to EINVAL. Since this was reversed in PR #37159, the change
introduced by 04ed58f is not only incorrect but also redundant.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #37158 from tchaikov/wip-no-more-assertDictContainsSubset
Kefu Chai [Fri, 18 Sep 2020 07:18:31 +0000 (15:18 +0800)]
Merge pull request #37158 from tchaikov/wip-no-more-assertDictContainsSubset

mgr/dashboard: replace assertDictContainsSubset() with assertLessEqual()

Reviewed-by: Volker Theile <vtheile@suse.com>
4 years agoMerge pull request #37170 from yaarith/add-smartctl-nvme-dependencies
Kefu Chai [Fri, 18 Sep 2020 05:42:44 +0000 (13:42 +0800)]
Merge pull request #37170 from yaarith/add-smartctl-nvme-dependencies

ceph.spec, debian: add smartmontools, nvme-cli dependencies

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoceph.spec.in, debian/control: add smartmontools and nvme-cli dependencies 37170/head
Yaarit Hatuka [Fri, 18 Sep 2020 03:25:56 +0000 (03:25 +0000)]
ceph.spec.in, debian/control: add smartmontools and nvme-cli dependencies

These packages are needed in order to scrape device health metrics from
devices used by OSD and MON daemons.

smartmontools' smartctl is what we use in order to scrape devices' SMART
attributes and general health metrics.
In addition, we use nvme-cli tool on NVMe devices, which fetches
vendor specific NVMe related health metrics.

Ceph rely on these tools for proper functioning of the underlying layers
of devicehealth mgr module, and other mgr modules which use devicehealth
functionality (such as diskprediction_local, telemetry, dashboard).

Essentially, most of devicehealth commands rely on proper functioning of
smartctl, otherwise they lack the device health metrics.

For example, in case smartctl is missing, the commands:
    ceph device scrape-daemon-health-metrics <who>
    ceph device scrape-health-metrics [<devid>]
will not be able to scrape health metrics, and the command:
    ceph device predict-life-expectancy <devid>
will not provide any meaningful output (since there are no metrics).

In short, when we scrape a device by its daemon (be it an OSD or a MON):
  ceph device scrape-daemon-health-metrics <who>
The devicehealth module command eventually invokes a
block_device_get_metrics() call in either osd/OSD.cc or mon/Monitor.cc,
which wraps calls to both
    block_device_run_smartctl()       (spawns smartctl)
    block_device_run_vendor_nvme()    (spawns nvme)
in common/blkdev.cc.

Minimum version requirements:
'smartmontools' is the package name, which contains two utility
programs: 'smartd' and 'smartctl'. Ceph uses the latter.

Version 6.7 of smartctl first introduced the --json option (beta), which
allows to output the metrics in a JSON format. Since then a few
adjustments were made and the feature officially launched in smartctl
version 7.0.
Since we rely on the JSON format to process the metrics, we must have
smartmontools' smartctl version >= 7.

That said, we choose not to specify smartmontools version here on
purpose, since there might be a scenario where:
We specified smartmontools version to be >= 7.
smartmontools 7 is not available yet in rhel 8 / centos 8.
A user installs via rpm ceph-osd, for example.
smartmontools will not be installed (since version >= 7 is not available
in this repo yet).
Then the user upgrades to 8.3 (which should have smartmontools >= 7),
but smartmontools will not get upgraded (since it's not installed).
In the scenario where we do not specify a version, smartmontools 6.6
will be installed, but it will be upgraded to >= 7 when a user upgrades
(and if it's a fresh installation - version >= 7 would be installed
anyway).

nvme-cli does not have a minimum version.

We use 'Recommends' for both rpm and deb packages since we do not want
the installation to fail in case of conflicts. 'Recommends' weakens the
dependency to be installed in case possible, but ignores it in cases of
conflicts with other dependencies.

It's worth mentioning that smartmontools and nvme-cli dependencies exist
in ceph-container builds.
We add them here for the cases of bare metal installations.

In the future we will add a separate package (with smartmontools and
nvme-cli dependencies) that can be installed on any node (running
rbd-mirror, rgw, mds, mgr, etc.), in order to be able to collect the
health metrics of its devices and offer their life expectancy
prediction.

Fixes: https://tracker.ceph.com/issues/47479
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
4 years agoMerge PR #37163 into master
Patrick Donnelly [Fri, 18 Sep 2020 01:30:11 +0000 (18:30 -0700)]
Merge PR #37163 into master

* refs/pull/37163/head:
mds: silence warning ‘MDSRank::fs_name’ will be initialized after [-Wreorder]

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge PR #37147 into master
Patrick Donnelly [Fri, 18 Sep 2020 01:28:13 +0000 (18:28 -0700)]
Merge PR #37147 into master

* refs/pull/37147/head:
mds/FSMap: check parse_role return before filtering

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #36989 from AmnonHanuhov/wip-ObjectStore_EIO_Handling
David Zafman [Fri, 18 Sep 2020 00:45:42 +0000 (17:45 -0700)]
Merge pull request #36989 from AmnonHanuhov/wip-ObjectStore_EIO_Handling

osd: Got rid of global flag eio_errors_to_process

Reviewed-by: David Zafman <dzafman@redhat.com>
4 years agoMerge pull request #36397 from dzafman/wip-39012
David Zafman [Fri, 18 Sep 2020 00:30:43 +0000 (17:30 -0700)]
Merge pull request #36397 from dzafman/wip-39012

distinguish unfound + impossible to find, vs start some down OSDs to get

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #37132 from lixiaoy1/dirty_cache_feature
Jason Dillaman [Thu, 17 Sep 2020 23:04:29 +0000 (19:04 -0400)]
Merge pull request #37132 from lixiaoy1/dirty_cache_feature

librbd: add DIRTY_CACHE in IMPLICIT_ENABLE

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #36586 from MahatiC/wip-ssd-integration
Jason Dillaman [Thu, 17 Sep 2020 21:52:30 +0000 (17:52 -0400)]
Merge pull request #36586 from MahatiC/wip-ssd-integration

librbd/cache: SSD cache integration framework

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37141 from sebastian-philipp/cephadm-fix-rm-util.load_from_store
Kefu Chai [Thu, 17 Sep 2020 16:32:22 +0000 (00:32 +0800)]
Merge pull request #37141 from sebastian-philipp/cephadm-fix-rm-util.load_from_store

mgr/cephadm: fix RemoveUtil.load_from_store()

Reviewed-by: Joshua Schmid <jschmid@suse.de>
4 years agoMerge PR #37197 into master
Patrick Donnelly [Thu, 17 Sep 2020 13:42:33 +0000 (06:42 -0700)]
Merge PR #37197 into master

* refs/pull/37197/head:
doc: add "fs authorize" subcommand to ceph man page

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #37120 from tchaikov/wip-rados-type-hintings
Kefu Chai [Thu, 17 Sep 2020 10:40:06 +0000 (18:40 +0800)]
Merge pull request #37120 from tchaikov/wip-rados-type-hintings

pybind/rados: add more type hintings

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #37143 from dvanders/dvanders_flush
Kefu Chai [Thu, 17 Sep 2020 10:39:09 +0000 (18:39 +0800)]
Merge pull request #37143 from dvanders/dvanders_flush

ceph.in: ignore failures to flush stdout

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37100 from rhcs-dashboard/fix-47400-master
Kefu Chai [Thu, 17 Sep 2020 10:38:15 +0000 (18:38 +0800)]
Merge pull request #37100 from rhcs-dashboard/fix-47400-master

ceph: ignore BrokenPipeError when printing help

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37045 from tchaikov/wip-crimson-bt
Kefu Chai [Thu, 17 Sep 2020 10:16:06 +0000 (18:16 +0800)]
Merge pull request #37045 from tchaikov/wip-crimson-bt

common/BackTrace: extract demangle() out

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agocommon/BackTrace: let abi::__cxa_demangle() do the malloc 37045/head
Kefu Chai [Wed, 9 Sep 2020 00:42:24 +0000 (08:42 +0800)]
common/BackTrace: let abi::__cxa_demangle() do the malloc

also use the returned length for constructing the string_view to be
appended.

we could reuse the buffer across multiple demangle() call for saving the
calls to malloc()/free(). but the upside of this change is that it's
simpler.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocommon/BackTrace: extract demangle() out
Kefu Chai [Tue, 8 Sep 2020 11:52:46 +0000 (19:52 +0800)]
common/BackTrace: extract demangle() out

so it can be reused by crimson

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agodoc: add "fs authorize" subcommand to ceph man page 37197/head
Rishabh Dave [Thu, 20 Aug 2020 13:00:12 +0000 (18:30 +0530)]
doc: add "fs authorize" subcommand to ceph man page

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #37187 from kamoltat/patch-1
Kefu Chai [Thu, 17 Sep 2020 04:04:08 +0000 (12:04 +0800)]
Merge pull request #37187 from kamoltat/patch-1

doc/dev/macos: remove nonexistence flag `--with-toolchain`

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge PR #37199 into master
Patrick Donnelly [Wed, 16 Sep 2020 23:44:38 +0000 (16:44 -0700)]
Merge PR #37199 into master

* refs/pull/37199/head:
qa/cephfs: add a note to test_nfs.py

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agodoc: Add doc and PendingRealeaseNotes 36397/head
David Zafman [Tue, 15 Sep 2020 00:11:07 +0000 (17:11 -0700)]
doc: Add doc and PendingRealeaseNotes

Add help about new list_unfound fields in troubleshooting-pg.rst
Add info in PendingReleaseNotes

Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agoMerge PR #37159 into master
Patrick Donnelly [Wed, 16 Sep 2020 19:20:13 +0000 (12:20 -0700)]
Merge PR #37159 into master

* refs/pull/37159/head:
mon/MDSMonitor: return zero when mds is absent for "mds fail"

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoqa/cephfs: add a note to test_nfs.py 37199/head
Rishabh Dave [Wed, 16 Sep 2020 16:39:17 +0000 (22:09 +0530)]
qa/cephfs: add a note to test_nfs.py

A note that tells that test_nfs.py is not yet compatible with
vstart_runner.py.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #37167 from neha-ojha/wip-47239
Neha Ojha [Wed, 16 Sep 2020 16:30:11 +0000 (09:30 -0700)]
Merge pull request #37167 from neha-ojha/wip-47239

qa/tasks/ceph_manager.py: remove redundant check in raw_cluster_cmd_result

Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agomds: silence warning ‘MDSRank::fs_name’ will be initialized after [-Wreorder] 37163/head
Jos Collin [Tue, 15 Sep 2020 14:27:22 +0000 (19:57 +0530)]
mds: silence warning ‘MDSRank::fs_name’ will be initialized after [-Wreorder]

Fixes the warning:
ceph/src/mds/MDSRank.h:436:17: warning: ‘MDSRank::fs_name’ will be initialized after [-Wreorder]

Signed-off-by: Jos Collin <jcollin@redhat.com>
4 years agodoc/dev/macos: remove nonexistence flag `--with-toolchain` 37187/head
Kamoltat Sirivadhna [Wed, 16 Sep 2020 09:17:54 +0000 (16:17 +0700)]
doc/dev/macos: remove nonexistence flag `--with-toolchain`

` --with-toolchain` is an old option from llvm 6

Signed-off-by: Kamoltat Sirivadhna <ksirivad@redhat.com>
4 years agoMerge pull request #37109 from theanalyst/doc/releases/v15.2.5
Abhishek L [Wed, 16 Sep 2020 14:51:22 +0000 (16:51 +0200)]
Merge pull request #37109 from theanalyst/doc/releases/v15.2.5

doc: releases: notes for v15.2.5 octopus

Reviewed-By: Neha Ojha <nojha@redhat.com>
Reviewed-By: Nathan Cutler <ncutler@suse.com>
4 years agoMerge pull request #37166 from adamemerson/wip-undetailed-time
Kefu Chai [Wed, 16 Sep 2020 12:59:35 +0000 (20:59 +0800)]
Merge pull request #37166 from adamemerson/wip-undetailed-time

common/ceph_time: Don't define public things in time_detail

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agomon/MDSMonitor: return zero when mds is absent for "mds fail" 37159/head
Rishabh Dave [Tue, 15 Sep 2020 19:40:31 +0000 (01:10 +0530)]
mon/MDSMonitor: return zero when mds is absent for "mds fail"

... instead of EINVAL.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #37093 from guits/guits-bz1877672
Jan Fajerski [Wed, 16 Sep 2020 12:25:24 +0000 (14:25 +0200)]
Merge pull request #37093 from guits/guits-bz1877672

ceph-volume: fix simple activate when legacy osd

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
4 years agoMerge pull request #35956 from ishanrai05/hover
Lenz Grimmer [Wed, 16 Sep 2020 11:49:54 +0000 (13:49 +0200)]
Merge pull request #35956 from ishanrai05/hover

mgr/dashboard: Display description on mouse hover

Reviewed-by: Tiago Melo <tmelo@suse.com>
4 years agoMerge pull request #35924 from pritha-srivastava/wip-rgw-sts-error-messages
Matt Benjamin [Wed, 16 Sep 2020 11:20:51 +0000 (07:20 -0400)]
Merge pull request #35924 from pritha-srivastava/wip-rgw-sts-error-messages

rgw/sts: adding error log messages to STS code.

4 years agoMerge pull request #36255 from pritha-srivastava/wip-rgw-sts-user-as-owner
Matt Benjamin [Wed, 16 Sep 2020 11:09:14 +0000 (07:09 -0400)]
Merge pull request #36255 from pritha-srivastava/wip-rgw-sts-user-as-owner

rgw/sts: adding code for federated user as owner in case of STS.

4 years agoceph-volume: fix simple activate when legacy osd 37093/head
Guillaume Abrioux [Thu, 10 Sep 2020 23:13:06 +0000 (01:13 +0200)]
ceph-volume: fix simple activate when legacy osd

`ceph-volume simple activate --all` relies on the presence of json files
in `/etc/ceph/osd` that was created with `ceph-volume simple scan`
command.

In a cluster lifecycle, it is very likely an OSD which was deployed with
ceph-disk at some point gets removed or replaced. It means the corresponding
json file in `/etc/ceph/osd` becomes unrelevant. It makes `ceph-volume
simple activate --all` fails because it tries to mount non existing
partitions.
The idea here is to simply warn the user that the osd described in the
json file doesn't exist anymore and exit properly instead of throwing an
error.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1877672
Closes: https://tracker.ceph.com/issues/47493
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoMerge pull request #36898 from sebastian-philipp/doc-fix-orch-apply-mgr
Joshua Schmid [Wed, 16 Sep 2020 08:04:28 +0000 (10:04 +0200)]
Merge pull request #36898 from sebastian-philipp/doc-fix-orch-apply-mgr

doc/mgr: fix outdated `orch apply` docs.

4 years agoMerge pull request #35986 from TRYTOBE8TME/wip-rgw-sts-new
Ali Maredia [Wed, 16 Sep 2020 05:38:50 +0000 (01:38 -0400)]
Merge pull request #35986 from TRYTOBE8TME/wip-rgw-sts-new

STS Testing Files

4 years agoMerge pull request #37172 from tchaikov/wip-crimson-object-context-lock
Kefu Chai [Wed, 16 Sep 2020 04:42:39 +0000 (12:42 +0800)]
Merge pull request #37172 from tchaikov/wip-crimson-object-context-lock

crimson/common/tri_mutex: update the class comment

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agocrimson/osd/object_context: s/rwlock/lock/ 37172/head
Kefu Chai [Wed, 16 Sep 2020 01:12:52 +0000 (09:12 +0800)]
crimson/osd/object_context: s/rwlock/lock/

so it's less confusing.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/common/tri_mutex: update the class comment
Kefu Chai [Wed, 16 Sep 2020 01:10:10 +0000 (09:10 +0800)]
crimson/common/tri_mutex: update the class comment

to explain the reason why we have tri_mutex, and how it is related to
pipelined read / write. and the mutual exclusion between read, write
and rmw operations.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37131 from tchaikov/wip-47311
Kefu Chai [Wed, 16 Sep 2020 01:01:32 +0000 (09:01 +0800)]
Merge pull request #37131 from tchaikov/wip-47311

crimson/object_context: make obc interruptible

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agoceph: ignore BrokenPipeError when printing help 37100/head
Ernesto Puerta [Fri, 11 Sep 2020 10:10:16 +0000 (12:10 +0200)]
ceph: ignore BrokenPipeError when printing help

ignore BrokenPipeError which is thrown when piping the output of ceph
CLI to a tool which might close its stdin before ceph CLI sends the
whole help message.

Follow approach suggested by Kefu: https://github.com/python/cpython/commit/7b0ed43af55c1e2844aa0ccd5e088b2ddd38dbdb
This doesn't manage the clean-up/exit logic, as that's deferred to the
last part of the __main__ code.

Fixes: https://tracker.ceph.com/issues/47400
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
4 years agocommon/ceph_time: Don't define public things in time_detail 37166/head
Adam C. Emerson [Tue, 15 Sep 2020 17:58:30 +0000 (13:58 -0400)]
common/ceph_time: Don't define public things in time_detail

Defining things in a detail section and then using them outside turned
out to not be the best idea.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
4 years agoqa/tasks/ceph_manager.py: remove redundant check in raw_cluster_cmd_result 37167/head
Neha Ojha [Mon, 14 Sep 2020 21:43:50 +0000 (21:43 +0000)]
qa/tasks/ceph_manager.py: remove redundant check in raw_cluster_cmd_result

Fixes 530982129ec131ef78e2f9989abfaeddb0959c65. The check for cephadm is no
longer needed since it was moved to run_cluster_cmd.

Fixes: https://tracker.ceph.com/issues/47239
Signed-off-by: Neha Ojha <nojha@redhat.com>
4 years agomgr/dashboard: replace assertDictContainsSubset() with assertLessEqual() 37158/head
Kefu Chai [Tue, 15 Sep 2020 12:13:57 +0000 (20:13 +0800)]
mgr/dashboard: replace assertDictContainsSubset() with assertLessEqual()

to silence the warnings like

tests/test_access_control.py::AccessControlTest::test_show_all_users
  /usr/lib/python3.6/unittest/case.py:1126: DeprecationWarning: assertDictContainsSubset is deprecated
    DeprecationWarning)

as assertDictContainsSubset() method was deprecated, see also
https://dev.rbcafe.com/python/python-3.5.1/whatsnew/3.2.html#unittest

Signed-off-by: Volker Theile <vtheile@suse.com>
4 years agorgw/sts: adding documentation for a shadow user created for 36255/head
Pritha Srivastava [Wed, 5 Aug 2020 05:57:59 +0000 (11:27 +0530)]
rgw/sts: adding documentation for a shadow user created for
a user that authenticates with oidc provider.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
4 years agorgw/sts: adding code for federated user as owner in case of STS.
Pritha Srivastava [Wed, 22 Jul 2020 16:21:25 +0000 (21:51 +0530)]
rgw/sts: adding code for federated user as owner in case of STS.

A new user under the namespace 'oidc' is created for every federated
user in case of AssumeRoleWithWebIdentity.

In case of AssumeRole, the user that needs cross account access becomes
the owner.

In both cases buckets are created in the tenant that the role belongs to.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
4 years agorgw/sts: adding error log messages to STS code. 35924/head
Pritha Srivastava [Fri, 3 Jul 2020 15:21:03 +0000 (20:51 +0530)]
rgw/sts: adding error log messages to STS code.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
4 years agocommon/ceph_time: Don't indent under namespaces
Adam C. Emerson [Tue, 15 Sep 2020 15:16:53 +0000 (11:16 -0400)]
common/ceph_time: Don't indent under namespaces

This is a violation of our guidelines and since I'm making a larger
change anyway.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
4 years agolibrbd/cache: Rename namespaces and move files 36586/head
Mahati Chamarthy [Wed, 2 Sep 2020 09:53:06 +0000 (15:23 +0530)]
librbd/cache: Rename namespaces and move files

Signed-off-by: Lisa Li <xiaoyan.li@intel.com>
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
4 years agolibrbd/cache: Establish the framework to integrate RWL and SSD
Mahati Chamarthy [Fri, 3 Jul 2020 11:08:50 +0000 (16:38 +0530)]
librbd/cache: Establish the framework to integrate RWL and SSD

- Create WriteLogCache class
- Rename ReplicatedWriteLog files to AbstractWriteLog and
  modify the I/O method names
- fix the test
- Modify CMakeLists.txt to add newly created classes

Signed-off-by: Lisa Li <xiaoyan.li@intel.com>
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
4 years agocrimson/osd: replace "ceph_abort_msg()" with assert() 37131/head
Kefu Chai [Tue, 15 Sep 2020 01:55:47 +0000 (09:55 +0800)]
crimson/osd: replace "ceph_abort_msg()" with assert()

these are programming errors, and are easy to detect. also assert() does
not return, so compiler won't complain at seeing a branch does not
return value in a function that returns value.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/object_context: make obc interruptible
Xuehan Xu [Fri, 11 Sep 2020 11:01:52 +0000 (19:01 +0800)]
crimson/object_context: make obc interruptible

* add tri_mutex::abort() to pass given exception to all waiters
* add ObjectContext::interrupt() to abort all pending consumers
  of current object context

Fixes: https://tracker.ceph.com/issues/47311
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson: use tri_mutex for guarding ObjectContext
Kefu Chai [Mon, 14 Sep 2020 07:23:17 +0000 (15:23 +0800)]
crimson: use tri_mutex for guarding ObjectContext

before this change, a seastar::shared_mutex, a RWState and a
shared_promise are used for tracking the consumers of ObjectContext.
and all of the consumers are put into writers if the predicate function
evaluates to "false", and is awaken if the predicate function evaluates
to "true" afterwards in a polling loop waiting on the shared_promise,
which is in turn fulfilled once the last consumer of the given category
relinquishes the lock.

this approach has couple issues:

* it is heavy weighted. seastar::shared_mutex already tracks each of
  the waiters' continuation using separate promise<>, and it does try
  to reschedule them once a given consumer releases the last lock.
  so it's like a design of a customized shared_mutex over a
  shared_mutex.
* it is complicated. 3 variables for tracking the different
  consumers of ObjectContext.

in this change,

* `tri_mutex` is introduced as a variant of the original
  `seastar::shared_mutex` to track two different shared users in
  addition to an exclusive user.
* replace `shared_mutex` with `tri_mutex` in `ObjectContext`, to
  simplify the design.
* move recovery_read_marker into `ObjectContext`. assuming all
  pending actions will be added as a waiter for the related
  object context before they acquire the lock.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: add ObjectContext::wait_recovery_read()
Kefu Chai [Mon, 14 Sep 2020 06:22:40 +0000 (14:22 +0800)]
crimson/osd: add ObjectContext::wait_recovery_read()

instead of reusing ObjectContext::get_recovery_read() for both
sync call and async call. just add a new method for the async call
for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37113 from dillaman/wip-47390
Mykola Golub [Tue, 15 Sep 2020 07:29:47 +0000 (10:29 +0300)]
Merge pull request #37113 from dillaman/wip-47390

librbd: ensure local site is included in mirror image global status

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agoqa : STS Testing Files (AssumeRole and GetSessionToken) 35986/head
Kalpesh Pandya [Fri, 22 May 2020 20:58:53 +0000 (02:28 +0530)]
qa : STS Testing Files (AssumeRole and GetSessionToken)

Added required files for testing of AssumeRole and GetSessionToken API's and modified s3tests.py to handle the same.

(cherry picked from commit c2c90eaf524087925b8a0993098a87132d4940bd)

Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
4 years agoMerge pull request #37126 from tchaikov/wip-crimson-test
Kefu Chai [Tue, 15 Sep 2020 01:21:57 +0000 (09:21 +0800)]
Merge pull request #37126 from tchaikov/wip-crimson-test

test/crimson: cleanups

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agoMerge pull request #35167 from BryceCao/wip-inspect-zonegroup-when-create-existing...
Casey Bodley [Mon, 14 Sep 2020 21:11:08 +0000 (17:11 -0400)]
Merge pull request #35167 from BryceCao/wip-inspect-zonegroup-when-create-existing-bucket

rgw : add check for zonegroup when create existing bucket

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #36978 from cbodley/wip-47028
Casey Bodley [Mon, 14 Sep 2020 21:09:59 +0000 (17:09 -0400)]
Merge pull request #36978 from cbodley/wip-47028

rgw: add check for ACL when create existing bucket

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agoMerge PR #36125 into master
Patrick Donnelly [Mon, 14 Sep 2020 20:49:50 +0000 (13:49 -0700)]
Merge PR #36125 into master

* refs/pull/36125/head:
doc: cephfs/fs-nfs-exports: more cleanups
doc: cephfs/fs-nfs-exports: command requires enabled orch module
doc: cephfs/fs-nfs-exports.rst: write "RADOS" in ALL-CAPS
doc: cephfs/fs-nfs-exports: use "NFS Ganesha" everywhere
doc: cephfs: clarify that pseudo root path must be absolute
doc: cephfs: fix misleading "ceph fs volume create" command
doc: cephfs: fix misleading "ceph nfs create" command

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zac Dover <zac.dover@gmail.com>
4 years agotest: Modify test to check new feature might_have_unfound added to list_unfound
David Zafman [Tue, 4 Aug 2020 21:03:16 +0000 (14:03 -0700)]
test: Modify test to check new feature might_have_unfound added to list_unfound

Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agotest: Test list_unfound with asserts to check for new fields
David Zafman [Wed, 29 Jul 2020 00:38:44 +0000 (17:38 -0700)]
test: Test list_unfound with asserts to check for new fields

Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agotest: Fix typos in descriptions
David Zafman [Sun, 13 Sep 2020 17:09:53 +0000 (10:09 -0700)]
test: Fix typos in descriptions

Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agoosd: Feature to add might_have_unfound info to list_unfound requests
David Zafman [Wed, 12 Aug 2020 21:32:32 +0000 (14:32 -0700)]
osd: Feature to add might_have_unfound info to list_unfound requests

fixes: https://tracker.ceph.com/issues/39012

Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agoFix to raise BOOST_MPL_LIMIT_LIST_SIZE from 20 to 30
David Zafman [Thu, 30 Jul 2020 22:38:19 +0000 (15:38 -0700)]
Fix to raise BOOST_MPL_LIMIT_LIST_SIZE from 20 to 30

Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agomds/FSMap: check parse_role return before filtering 37147/head
Patrick Donnelly [Mon, 14 Sep 2020 19:21:10 +0000 (12:21 -0700)]
mds/FSMap: check parse_role return before filtering

If parse_role fails, then the fscid value is invalid.

This was caught in testing cephtool. Funnily enough, the command
rmfailed normally fails:

    2020-09-06T00:05:51.020 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:35: expect_false:  set -x
    2020-09-06T00:05:51.020 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:36: expect_false:  ceph mds rmfailed 0
    2020-09-06T00:05:51.318 INFO:tasks.workunit.client.0.smithi036.stderr:Error EPERM: WARNING: this can make your filesystem inaccessible! Add --yes-i-really-mean-it if you are sure you wish to continue.
    2020-09-06T00:05:51.321 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:36: expect_false:  return 0
    2020-09-06T00:05:51.322 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:989: test_mon_mds:  ceph mds rmfailed 0 --yes-i-really-mean-it
    2020-09-06T00:05:51.631 INFO:tasks.workunit.client.0.smithi036.stderr:Error EINVAL: Rank '0' not foundinvalid role '0'
    2020-09-06T00:05:51.634 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:990: test_mon_mds:  set -e

From: /ceph/teuthology-archive/teuthology-2020-09-14_07:01:01-rados-master-distro-basic-smithi/5434134/teuthology.log

The change in 811e48d6ffd841ecd93a57eb00c6aceae476f4f8 causes an abort because
this failure is not caught in the parse_role hook.

Fixes: https://tracker.ceph.com/issues/47444
Fixes: 811e48d6ffd841ecd93a57eb00c6aceae476f4f8
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #37086 from trociny/wip-qa-rbd-nbd-unmap
Jason Dillaman [Mon, 14 Sep 2020 18:32:30 +0000 (14:32 -0400)]
Merge pull request #37086 from trociny/wip-qa-rbd-nbd-unmap

qa/workunits/rbd: yet another attempt to improve rbd-nbd unmap

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37038 from trociny/wip-rbd-nbd-quiesce-error
Jason Dillaman [Mon, 14 Sep 2020 18:31:58 +0000 (14:31 -0400)]
Merge pull request #37038 from trociny/wip-rbd-nbd-quiesce-error

rbd-nbd: return quiesce hook exit code

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoosd: Move scrubber info out of recovery_state and add fields to scrubber::dump()
David Zafman [Tue, 11 Aug 2020 02:51:12 +0000 (19:51 -0700)]
osd: Move scrubber info out of recovery_state and add fields to scrubber::dump()

Add scrubber::dump() function which is a more obvious place when adding fields
Indicate that the scrubber info in recovery_state is deprecated

Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agorbd: add DIRTY_CACHE in IMPLICIT_ENABLE 37132/head
lixiaoy1 [Mon, 14 Sep 2020 16:10:11 +0000 (12:10 -0400)]
rbd: add DIRTY_CACHE in IMPLICIT_ENABLE

Add DIRTY_CACHE IN RBD_FEATURES_IMPLICIT_ENABLE, so that when creating
images, it won't create an image with the DIRTY_CACHE feature.

Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
4 years agoMerge pull request #37107 from dillaman/wip-47405
Mykola Golub [Mon, 14 Sep 2020 15:13:28 +0000 (18:13 +0300)]
Merge pull request #37107 from dillaman/wip-47405

qa/workunits/mon: fixed excessively large pool PG count

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agoMerge pull request #37115 from sebastian-philipp/cephadm-refactor-cephamservice-create
Sebastian Wagner [Mon, 14 Sep 2020 14:43:45 +0000 (16:43 +0200)]
Merge pull request #37115 from sebastian-philipp/cephadm-refactor-cephamservice-create

mgr/cephadm: CephadmService.create -> CephadmService.prepare_create

Reviewed-by: Stephan Müller <smueller@suse.com>
4 years agoMerge pull request #35945 from jschmid1/osdspec_limit_fixes
Sebastian Wagner [Mon, 14 Sep 2020 14:41:57 +0000 (16:41 +0200)]
Merge pull request #35945 from jschmid1/osdspec_limit_fixes

mgr/cephadm: allow to map existing daemons to osdspecs

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoceph.in: ignore failures to flush stdout 37143/head
Dan van der Ster [Mon, 14 Sep 2020 14:23:53 +0000 (16:23 +0200)]
ceph.in: ignore failures to flush stdout

Catch an IOError exception when flushing ceph stdout.

Fixes: https://tracker.ceph.com/issues/47442
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
4 years agoMerge pull request #36997 from linuxbox2/wip-rgwlc-mtime
Casey Bodley [Mon, 14 Sep 2020 14:19:25 +0000 (10:19 -0400)]
Merge pull request #36997 from linuxbox2/wip-rgwlc-mtime

rgwlc:  fix (post-parallel) non-current expiration

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agoMerge pull request #37125 from tchaikov/wip-rgw-const-char
Casey Bodley [Mon, 14 Sep 2020 14:15:31 +0000 (10:15 -0400)]
Merge pull request #37125 from tchaikov/wip-rgw-const-char

rgw: convert string constant to string_view

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agomgr/cephadm: fix RemoveUtil.load_from_store() 37141/head
Sebastian Wagner [Mon, 14 Sep 2020 13:15:12 +0000 (15:15 +0200)]
mgr/cephadm: fix RemoveUtil.load_from_store()

* Run `json.loads` only once
* `nodename` -> `hostname`
* Remove network calls from `repr(OSD(...)`

Fixes: https://tracker.ceph.com/issues/47438
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoqa/workunits/mon: fixed excessively large pool PG count 37107/head
Jason Dillaman [Mon, 14 Sep 2020 12:58:52 +0000 (08:58 -0400)]
qa/workunits/mon: fixed excessively large pool PG count

Fixes: https://tracker.ceph.com/issues/47405
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agomgr/cephadm: CephadmService.create -> CephadmService.prepare_create 37115/head
Sebastian Wagner [Fri, 11 Sep 2020 17:49:57 +0000 (19:49 +0200)]
mgr/cephadm: CephadmService.create -> CephadmService.prepare_create

Refactored this to simplify the control flow. It became obvious that

* `CephadmService.make_daemon_spec`
* `CephadmService.prepare_create`
* `CephadmService.generate_config`

are basically the same thing. They're all called directly
before the deployment of a daemon. All of them should be
unified. This PR makes this refactorization simpler

By renaming `create` to `prepare_create`, we make `create`
no longer being the entrypoint to call
`create_daemon`. Thus all the functions above
return some data structures.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #37044 from votdev/update_on_demand
Lenz Grimmer [Mon, 14 Sep 2020 09:50:19 +0000 (11:50 +0200)]
Merge pull request #37044 from votdev/update_on_demand

mgr/dashboard: Update datatable only when necessary

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
4 years agoMerge pull request #36845 from bk201/wip-44803
Lenz Grimmer [Mon, 14 Sep 2020 09:48:22 +0000 (11:48 +0200)]
Merge pull request #36845 from bk201/wip-44803

mgr/dashboard: allow getting fresh inventory data from the orchestrator

Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
4 years agoMerge pull request #36365 from bk201/wip-44637
Lenz Grimmer [Mon, 14 Sep 2020 08:56:41 +0000 (10:56 +0200)]
Merge pull request #36365 from bk201/wip-44637

mgr/dashboard: add e2e tests for Orchestrator components

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
4 years agoMerge pull request #37127 from tchaikov/wip-crimson-errorator
Kefu Chai [Mon, 14 Sep 2020 05:19:47 +0000 (13:19 +0800)]
Merge pull request #37127 from tchaikov/wip-crimson-errorator

crimson/common: add specialization for futurize::invoke(Func, monostate)

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agocrimson/common: add comment to explain the partial specialization 37127/head
Kefu Chai [Mon, 14 Sep 2020 02:14:01 +0000 (10:14 +0800)]
crimson/common: add comment to explain the partial specialization

it might be confusing why we don't use explicit specialization for
defining errorator::futurize::stored_to_future.

quote from item 16, § 17.7.3, n4659:

In an explicit specialization declaration for a member of a class
template or a member template that appears in namespace scope, the
member template and some of its enclosing class templates may remain
unspecialized, except that the declaration shall not explicitly
specialize a class member template if its enclosing class templates are
not explicitly specialized as well.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37098 from tchaikov/wip-47179
Kefu Chai [Mon, 14 Sep 2020 01:44:35 +0000 (09:44 +0800)]
Merge pull request #37098 from tchaikov/wip-47179

common/admin_socket: always validate the parameters

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agocrimson/common: add specialization for futurize::invoke(Func, monostate)
Kefu Chai [Mon, 14 Sep 2020 00:36:12 +0000 (08:36 +0800)]
crimson/common: add specialization for futurize::invoke(Func, monostate)

this is a leftover of 260a702ba983f1bca29d4c8d1e28f3eef46c6699. where we
bumped up the Seastar API level to 5, in which seastar::internal::monostate
is used to represent the stored state of a future instead of a tuple<>.

to address FTBFS with GCC-9.2.1

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge PR #36987 into master
Patrick Donnelly [Sun, 13 Sep 2020 20:24:13 +0000 (13:24 -0700)]
Merge PR #36987 into master

* refs/pull/36987/head:
mgr: PyModuleRegistry::unregister_client() can run endlessly

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37069 from tchaikov/wip-seastar-lv5
Kefu Chai [Sun, 13 Sep 2020 16:37:38 +0000 (00:37 +0800)]
Merge pull request #37069 from tchaikov/wip-seastar-lv5

crimson/common: use seastar API level 5

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agotest/crimson: use ASSERT_EQ() for verify critial results 37126/head
Kefu Chai [Sun, 13 Sep 2020 15:59:24 +0000 (23:59 +0800)]
test/crimson: use ASSERT_EQ() for verify critial results

the following EXPECT_EQ() statements actually depends on this test.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agotest/crimson: use better names than ret
Kefu Chai [Sun, 13 Sep 2020 15:57:21 +0000 (23:57 +0800)]
test/crimson: use better names than ret

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agotest/crimson: use range-based loop when appropriate
Kefu Chai [Sun, 13 Sep 2020 15:52:00 +0000 (23:52 +0800)]
test/crimson: use range-based loop when appropriate

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agotest/crimson: remove unused variables
Kefu Chai [Sun, 13 Sep 2020 15:46:33 +0000 (23:46 +0800)]
test/crimson: remove unused variables

Signed-off-by: Kefu Chai <kchai@redhat.com>
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 agoseastar: pickup alien fixes 37069/head
Kefu Chai [Wed, 9 Sep 2020 13:14:57 +0000 (21:14 +0800)]
seastar: pickup alien fixes

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agorbd-nbd: initialize quiesce state variable 37038/head
Mykola Golub [Sat, 12 Sep 2020 09:20:40 +0000 (10:20 +0100)]
rbd-nbd: initialize quiesce state variable

Signed-off-by: Mykola Golub <mgolub@suse.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 agopybind/rados: add more type hintings 37120/head
Kefu Chai [Sat, 12 Sep 2020 05:49:00 +0000 (13:49 +0800)]
pybind/rados: add more type hintings

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