]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agopybind/mgr/prometheus/module.py: defaultdict for num_by_state 37909/head
Alexander Sushko [Fri, 27 Nov 2020 11:04:13 +0000 (14:04 +0300)]
pybind/mgr/prometheus/module.py: defaultdict for num_by_state

num_by_state[state] += count in get_pg_status method raises KeyError
if pg state is not in PG_STATES list. PG_STATES should be synced with
osd_types.cc:pg_state_string(). But sometimes it is not. After the
KeyError raise mgr metrics are not available at all.

Fixes: https://tracker.ceph.com/issues/46142
Signed-off-by: Alexander Sushko <alexandrsushko@gmail.com>
4 years agoMerge pull request #38431 from tchaikov/wip-rtd-doc
Kefu Chai [Thu, 10 Dec 2020 04:03:21 +0000 (12:03 +0800)]
Merge pull request #38431 from tchaikov/wip-rtd-doc

pybind,doc: build stub using cython and build API doc with RTD

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@hotmail.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #38329 from pcuzner/cephadm-exporter-docs
pcuzner [Wed, 9 Dec 2020 22:37:51 +0000 (11:37 +1300)]
Merge pull request #38329 from pcuzner/cephadm-exporter-docs

doc/dev/cephadm: document the cephadm exporter design

4 years agoMerge branch 'master' into cephadm-exporter-docs 38329/head
pcuzner [Wed, 9 Dec 2020 20:39:45 +0000 (09:39 +1300)]
Merge branch 'master' into cephadm-exporter-docs

4 years agodoc/dev/cephadm: update index links
Paul Cuzner [Wed, 9 Dec 2020 20:37:13 +0000 (09:37 +1300)]
doc/dev/cephadm: update index links

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agoMerge pull request #38472 from ronen-fr/wip-ronenf-qa-scrub
Ronen Friedman [Wed, 9 Dec 2020 19:41:14 +0000 (21:41 +0200)]
Merge pull request #38472 from ronen-fr/wip-ronenf-qa-scrub

test: cancelling both noscrub *and* nodeep-scrub

4 years agoMerge PR #38407 into master
Patrick Donnelly [Wed, 9 Dec 2020 19:29:10 +0000 (11:29 -0800)]
Merge PR #38407 into master

* refs/pull/38407/head:
qa: allow arbitrary mount options on kclient mounts

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge PR #38266 into master
Patrick Donnelly [Wed, 9 Dec 2020 19:23:11 +0000 (11:23 -0800)]
Merge PR #38266 into master

* refs/pull/38266/head:
client: add ceph.{cluster_fsid/client_id} vxattrs suppport

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
4 years agoMerge PR #38367 into master
Patrick Donnelly [Wed, 9 Dec 2020 19:21:28 +0000 (11:21 -0800)]
Merge PR #38367 into master

* refs/pull/38367/head:
pybind/cephfs: fix missing terminating NULL char in readlink()'s C string

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge PR #36127 into master
Patrick Donnelly [Wed, 9 Dec 2020 19:20:08 +0000 (11:20 -0800)]
Merge PR #36127 into master

* refs/pull/36127/head:
client: more reasonable statfs ffree

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
4 years agotest: cancelling both noscrub *and* nodeep-scrub 38472/head
Ronen Friedman [Mon, 7 Dec 2020 12:41:45 +0000 (14:41 +0200)]
test: cancelling both noscrub *and* nodeep-scrub

as part of osd-scrub-test.sh.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
4 years agoMerge pull request #37971 from lixiaoy1/rwl_plugin
Jason Dillaman [Wed, 9 Dec 2020 17:06:46 +0000 (12:06 -0500)]
Merge pull request #37971 from lixiaoy1/rwl_plugin

librbd/cache: make image persistent writeback cache as plugin

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #38484 from rhcs-dashboard/update-ssl-error-1
Ernesto Puerta [Wed, 9 Dec 2020 16:25:10 +0000 (17:25 +0100)]
Merge pull request #38484 from rhcs-dashboard/update-ssl-error-1

mgr/dashboard: Updating the inbuilt ssl providers error

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
4 years agoMerge pull request #38459 from ronen-fr/wip-ronenf-lua-include
Yuval Lifshitz [Wed, 9 Dec 2020 13:36:32 +0000 (15:36 +0200)]
Merge pull request #38459 from ronen-fr/wip-ronenf-lua-include

rgw/lua: fixing incompatible declarations of CephContext

4 years agoMerge pull request #37519 from pcuzner/docs-cephadm-config-drift
Sebastian Wagner [Wed, 9 Dec 2020 12:32:27 +0000 (13:32 +0100)]
Merge pull request #37519 from pcuzner/docs-cephadm-config-drift

doc/dev/cephadm: high level design for a compliance check feature

Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Zac Dover <zac.dover@gmail.com>
4 years agoMerge pull request #38498 from bk201/wip-48506
Kefu Chai [Wed, 9 Dec 2020 10:17:20 +0000 (18:17 +0800)]
Merge pull request #38498 from bk201/wip-48506

mgr/dashboard: remove pyOpenSSL version pinning

Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38415 from insujang/master
Kefu Chai [Wed, 9 Dec 2020 08:56:08 +0000 (16:56 +0800)]
Merge pull request #38415 from insujang/master

msg/async: refine worker creation in NetworkStack

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38457 from tchaikov/wip-mon-scrub-interval
Kefu Chai [Wed, 9 Dec 2020 08:45:00 +0000 (16:45 +0800)]
Merge pull request #38457 from tchaikov/wip-mon-scrub-interval

mon: use TYPE_SEC for mon_scrub_interval

Reviewed-by: Joao Eduardo Luis <joao@suse.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
4 years agomgr/dashboard: remove pyOpenSSL version pinning 38498/head
Kiefer Chang [Wed, 9 Dec 2020 07:55:24 +0000 (15:55 +0800)]
mgr/dashboard: remove pyOpenSSL version pinning

Tests require a newer version of pyOpenSSL.

Fixes: https://tracker.ceph.com/issues/48506
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
4 years agoMerge pull request #38497 from tchaikov/wip-seastar
Kefu Chai [Wed, 9 Dec 2020 05:40:38 +0000 (13:40 +0800)]
Merge pull request #38497 from tchaikov/wip-seastar

seastar: update seastar submodule

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agoMerge pull request #38491 from agayev/fix-hmsmr-compilation
Kefu Chai [Wed, 9 Dec 2020 03:47:55 +0000 (11:47 +0800)]
Merge pull request #38491 from agayev/fix-hmsmr-compilation

os/bluestore: Fix HMSMRDevice.cc compilation.

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoseastar: update seastar submodule 38497/head
Kefu Chai [Wed, 9 Dec 2020 03:33:56 +0000 (11:33 +0800)]
seastar: update seastar submodule

to pick up recent fixes in file io

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38437 from ifed01/wip-ifed-alloc-replay-dump
Kefu Chai [Wed, 9 Dec 2020 03:00:20 +0000 (11:00 +0800)]
Merge pull request #38437 from ifed01/wip-ifed-alloc-replay-dump

os/bluestore: add more means to troubleshoot allocator(s)

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
4 years agoMerge pull request #38454 from tchaikov/wip-compressor-cleanup
Kefu Chai [Wed, 9 Dec 2020 02:58:23 +0000 (10:58 +0800)]
Merge pull request #38454 from tchaikov/wip-compressor-cleanup

compressor: put Compressor into TOPNSPC namespace and use string_view

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #38458 from tchaikov/wip-librados-cct
Kefu Chai [Wed, 9 Dec 2020 02:57:00 +0000 (10:57 +0800)]
Merge pull request #38458 from tchaikov/wip-librados-cct

librados: move definition of cct_deleter to .cc

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #38418 from anthonyeleven/anthonyeleven/clarify-op-priorities
Neha Ojha [Tue, 8 Dec 2020 21:14:58 +0000 (13:14 -0800)]
Merge pull request #38418 from anthonyeleven/anthonyeleven/clarify-op-priorities

doc: clarify osd recovery op priority and fix a couple of typos

Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoos/bluestore: Fix HMSMRDevice.cc compilation. 38491/head
Abutalib Aghayev [Tue, 8 Dec 2020 15:38:59 +0000 (10:38 -0500)]
os/bluestore: Fix HMSMRDevice.cc compilation.

Signed-off-by: Abutalib Aghayev <agayev@psu.edu>
4 years agoMerge PR #38419 into master
Patrick Donnelly [Tue, 8 Dec 2020 15:35:23 +0000 (07:35 -0800)]
Merge PR #38419 into master

* refs/pull/38419/head:
vstart_runner: print result line unless opt_rotate_log is set

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agomgr/dashboard: Adding the alert bad certificate error to the ssl providers error 38484/head
Nizamudeen A [Tue, 8 Dec 2020 14:35:28 +0000 (20:05 +0530)]
mgr/dashboard: Adding the alert bad certificate error to the ssl providers error

upstream tracked in https://github.com/cherrypy/cheroot/pull/348
Fixes: https://tracker.ceph.com/issues/48490
Signed-off-by: Nizamudeen A <nia@redhat.com>
4 years agomgr/dashboard: Updating the inbuilt ssl providers error
Nizamudeen A [Tue, 8 Dec 2020 10:22:46 +0000 (15:52 +0530)]
mgr/dashboard: Updating the inbuilt ssl providers error

Fixes: https://tracker.ceph.com/issues/48490
Signed-off-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #37956 from dorindabassey/example-notific
Casey Bodley [Tue, 8 Dec 2020 13:51:04 +0000 (08:51 -0500)]
Merge pull request #37956 from dorindabassey/example-notific

examples/boto3/README: examples notification

Reviewed-by: Yuval Lifshitz <ylifshit@redhat.com>
4 years agoMerge pull request #38374 from rzarzynski/wip-crimson-backfill-remove
Kefu Chai [Tue, 8 Dec 2020 13:44:58 +0000 (21:44 +0800)]
Merge pull request #38374 from rzarzynski/wip-crimson-backfill-remove

crimson: add support for backfill, part 2 -- MOSDPGBackfillRemove

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38392 from rzarzynski/wip-crimson-backfill-virtual_pgfacade
Kefu Chai [Tue, 8 Dec 2020 13:43:46 +0000 (21:43 +0800)]
Merge pull request #38392 from rzarzynski/wip-crimson-backfill-virtual_pgfacade

crimson: use explicit, abstract interfaces for backfill's facades.

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38208 from sebastian-philipp/mgr-cephadm-type-annotations-mandatory
Sebastian Wagner [Tue, 8 Dec 2020 13:40:03 +0000 (14:40 +0100)]
Merge pull request #38208 from sebastian-philipp/mgr-cephadm-type-annotations-mandatory

mgr/cephadm: make type annotations mandatory for some modules

Reviewed-by: Michael Fritch <mfritch@suse.com>
4 years agocrimson: use explicit, abstract interfaces for backfill's facades. 38392/head
Radoslaw Zarzynski [Wed, 2 Dec 2020 09:26:29 +0000 (10:26 +0100)]
crimson: use explicit, abstract interfaces for backfill's facades.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoMerge pull request #37130 from pcuzner/cephadm-exporter
Sebastian Wagner [Tue, 8 Dec 2020 12:43:21 +0000 (13:43 +0100)]
Merge pull request #37130 from pcuzner/cephadm-exporter

cephadm:Add a daemon mode for cephadm to provide a metadata endpoint

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
4 years agoMerge pull request #38483 from tchaikov/wip-crimson-cleanup
Kefu Chai [Tue, 8 Dec 2020 11:32:36 +0000 (19:32 +0800)]
Merge pull request #38483 from tchaikov/wip-crimson-cleanup

crimson: cleanups

Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agomgr/cephadm: make annotations for schedule.py mandatory 38208/head
Sebastian Wagner [Fri, 20 Nov 2020 11:06:59 +0000 (12:06 +0100)]
mgr/cephadm: make annotations for schedule.py mandatory

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agomgr/cephadm: make annotations for inventory.py mandatory
Sebastian Wagner [Fri, 20 Nov 2020 11:04:53 +0000 (12:04 +0100)]
mgr/cephadm: make annotations for inventory.py mandatory

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agomgr/cephadm: make annotations for serve.py mandatory
Sebastian Wagner [Fri, 20 Nov 2020 10:56:26 +0000 (11:56 +0100)]
mgr/cephadm: make annotations for serve.py mandatory

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agomgr/cephadm: make annotations for upgrade.py mandatory
Sebastian Wagner [Fri, 20 Nov 2020 10:51:07 +0000 (11:51 +0100)]
mgr/cephadm: make annotations for upgrade.py mandatory

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #38106 from varshar16/wip-fix-rook-orch-ps-img-id-name
Sebastian Wagner [Tue, 8 Dec 2020 11:23:42 +0000 (12:23 +0100)]
Merge pull request #38106 from varshar16/wip-fix-rook-orch-ps-img-id-name

mgr/rook: Fix container id and image id in 'orch ps'

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Travis Nielsen <tnielsen@redhat.com>
4 years agoMerge pull request #38346 from varshar16/wip-remove-container-id-field-orch-ps
Sebastian Wagner [Tue, 8 Dec 2020 11:22:46 +0000 (12:22 +0100)]
Merge pull request #38346 from varshar16/wip-remove-container-id-field-orch-ps

mgr/orchestrator: Remove 'CONTAINER ID' col from orch ps if unknown

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #37952 from mgfritch/cephadm-json-decode
Sebastian Wagner [Tue, 8 Dec 2020 11:13:04 +0000 (12:13 +0100)]
Merge pull request #37952 from mgfritch/cephadm-json-decode

mgr/cephadm: handle JSONDecodeError

Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #38032 from mgfritch/cephadm-last-local-image-name
Sebastian Wagner [Tue, 8 Dec 2020 11:12:25 +0000 (12:12 +0100)]
Merge pull request #38032 from mgfritch/cephadm-last-local-image-name

cephadm: reference the last local image by digest

Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #38064 from mgfritch/cephadm-rm-host-key-err
Sebastian Wagner [Tue, 8 Dec 2020 11:09:14 +0000 (12:09 +0100)]
Merge pull request #38064 from mgfritch/cephadm-rm-host-key-err

mgr/cephadm: verify the `host` key exists during refresh

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agocrimson/test: make the backfill testing quieter. 38374/head
Radoslaw Zarzynski [Tue, 1 Dec 2020 22:03:33 +0000 (23:03 +0100)]
crimson/test: make the backfill testing quieter.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agocrimson/test: make use of maybe_flush() in the backfill testing.
Radoslaw Zarzynski [Tue, 1 Dec 2020 21:57:15 +0000 (22:57 +0100)]
crimson/test: make use of maybe_flush() in the backfill testing.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agocrimson/osd: add support for MOSDPGBackfillRemove at primary.
Radoslaw Zarzynski [Tue, 1 Dec 2020 15:26:52 +0000 (16:26 +0100)]
crimson/osd: add support for MOSDPGBackfillRemove at primary.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agocrimson/osd: add support for MOSDPGBackfillRemove at replicas.
Radoslaw Zarzynski [Tue, 24 Nov 2020 18:17:49 +0000 (19:17 +0100)]
crimson/osd: add support for MOSDPGBackfillRemove at replicas.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoMerge pull request #38130 from sebastian-philipp/cephadm-upgrade-fail-daemon
Sebastian Wagner [Tue, 8 Dec 2020 10:59:52 +0000 (11:59 +0100)]
Merge pull request #38130 from sebastian-philipp/cephadm-upgrade-fail-daemon

mgr/cephadm: upgrade: fail gracefully, if daemon redeploy fails

Reviewed-by: Michael Fritch <mfritch@suse.com>
4 years agoMerge pull request #38317 from sebastian-philipp/cephadm-reduce-log-dg-noise
Sebastian Wagner [Tue, 8 Dec 2020 10:59:27 +0000 (11:59 +0100)]
Merge pull request #38317 from sebastian-philipp/cephadm-reduce-log-dg-noise

mgr/cephadm: OSD service: reduce log noise

Reviewed-by: Michael Fritch <mfritch@suse.com>
4 years agocrimson/osd: return something in PG::do_delete_work() 38483/head
Kefu Chai [Tue, 8 Dec 2020 08:33:26 +0000 (16:33 +0800)]
crimson/osd: return something in PG::do_delete_work()

this silences the warning of

crimson/osd/pg.cc:316:1: warning: no return statement in function returning non-void [-Wreturn-type]
  316 | }
      | ^

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/os: use a constexpr function for sanity test
Kefu Chai [Tue, 8 Dec 2020 08:29:17 +0000 (16:29 +0800)]
crimson/os: use a constexpr function for sanity test

since match_stage_t is an alias of uint_8. it is an unsigned type, so an
instance of this type should be always greater or equal to 0.

this silences warning like:

stage_types.h:37:50: warning: comparison is always true due to limited range of data type [-Wtype-limits]
   37 |     static_assert(STAGE >= STAGE_BOTTOM && STAGE <= STAGE_TOP);
      |                                            ~~~~~~^~~~~~~~~~~~

also, GCC complains if it is able to assure that the compare always
returns true. so a function helps to silence it.

this warning is meaningless per-se, as we are using static_assert() to
perform sanity test at *compile-time*.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agolibrbd/cache: move image writeback cache to plugin 37971/head
lixiaoy1 [Wed, 4 Nov 2020 14:47:01 +0000 (22:47 +0800)]
librbd/cache: move image writeback cache to plugin

Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
4 years agoMerge pull request #38460 from ronen-fr/wip-ronenf-lua-move
Ronen Friedman [Tue, 8 Dec 2020 06:17:24 +0000 (08:17 +0200)]
Merge pull request #38460 from ronen-fr/wip-ronenf-lua-move

rgw: removing a pessimizing move

4 years agodoc: clarify osd recovery op priority and fix a couple of typos 38418/head
Anthony D'Atri [Thu, 3 Dec 2020 09:08:31 +0000 (01:08 -0800)]
doc: clarify osd recovery op priority and fix a couple of typos

Signed-off-by: Anthony D'Atri <anthony.datri@gmail.com>
4 years agopybind/cephfs: fix missing terminating NULL char in readlink()'s C string 38367/head
Tuan Hoang [Tue, 1 Dec 2020 10:57:33 +0000 (11:57 +0100)]
pybind/cephfs: fix missing terminating NULL char in readlink()'s C string

The error is in test_readlink() in src/test/pybind/test_cephfs.py:

...
test_cephfs.test_readlink ... FAIL

======================================================================
FAIL: test_cephfs.test_readlink
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/tmhoang/test_cephfs.py", line 99, in test_readlink
    assert_equal(d, b"/file-1")
AssertionError: b'/file-1\xe8' != b'/file-1'
...

Fixes: https://tracker.ceph.com/issues/48408
Signed-off-by: Tuan Hoang <tmhoang@linux.ibm.com>
4 years agolibrbd/plugin: enable hook points for exclusive lock
lixiaoy1 [Wed, 4 Nov 2020 14:21:15 +0000 (22:21 +0800)]
librbd/plugin: enable hook points for exclusive lock

Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
4 years agoMerge pull request #36986 from cyx1231st/wip-seastar-onode-tree-upstream
Samuel Just [Mon, 7 Dec 2020 04:59:28 +0000 (20:59 -0800)]
Merge pull request #36986 from cyx1231st/wip-seastar-onode-tree-upstream

crimson/seastore: add initial onode staged-fltree

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agocrimson/test: fix test/tool make target names 36986/head
Yingxin Cheng [Mon, 7 Dec 2020 01:46:03 +0000 (09:46 +0800)]
crimson/test: fix test/tool make target names

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
4 years agocrimson/staged-onode-tree: use LT, EQ, GT for comparison results
Yingxin Cheng [Mon, 7 Dec 2020 01:40:31 +0000 (09:40 +0800)]
crimson/staged-onode-tree: use LT, EQ, GT for comparison results

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
4 years agocrimson/onode-staged-tree: add and fix comments
Yingxin Cheng [Fri, 4 Dec 2020 08:42:43 +0000 (16:42 +0800)]
crimson/onode-staged-tree: add and fix comments

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
4 years agoMerge pull request #38356 from icepic/patch-2
zdover23 [Sun, 6 Dec 2020 22:30:28 +0000 (08:30 +1000)]
Merge pull request #38356 from icepic/patch-2

doc/radosgw: Fix misspelled word in index.rst

Reviewed-by: Zac Dover <zac.dover@gmail.com>
4 years agorgw: removing a pessimizing move 38460/head
Ronen Friedman [Sun, 6 Dec 2020 10:13:53 +0000 (12:13 +0200)]
rgw: removing a pessimizing move

"warning: moving a temporary object prevents copy elision"

Co-authored-by: Kefu Chai <kefu@redhat.com>
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
4 years agoMerge pull request #38324 from tchaikov/wip-mon-cleanups
Kefu Chai [Sun, 6 Dec 2020 15:20:24 +0000 (23:20 +0800)]
Merge pull request #38324 from tchaikov/wip-mon-cleanups

mon: drop QuorumService and cleanups.

Reviewed-by: Joao Eduardo Luis <joao@suse.com>
4 years agomon/ConfigKeyService: drop ConfigKeyService::dispatch() 38324/head
Kefu Chai [Sat, 28 Nov 2020 13:41:01 +0000 (21:41 +0800)]
mon/ConfigKeyService: drop ConfigKeyService::dispatch()

this method is basically an alias of
ConfigKeyService::service_dispatch(), so get rid of it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon/ConfigKeyService: drop ConfigKeyService::get_name()
Kefu Chai [Sat, 28 Nov 2020 13:35:10 +0000 (21:35 +0800)]
mon/ConfigKeyService: drop ConfigKeyService::get_name()

the only caller of this function is prefix(), so hardcode the service
name there instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon/ConfigKeyService: remove unused bits
Kefu Chai [Sat, 28 Nov 2020 13:23:38 +0000 (21:23 +0800)]
mon/ConfigKeyService: remove unused bits

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon/ConfigKeyService: store mon and paxos using reference
Kefu Chai [Sat, 28 Nov 2020 13:01:12 +0000 (21:01 +0800)]
mon/ConfigKeyService: store mon and paxos using reference

before this change, we always have a valid pointer as member variable.
so, a reference serve this purpose better.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon: drop QuorumService
Kefu Chai [Sat, 28 Nov 2020 11:35:08 +0000 (19:35 +0800)]
mon: drop QuorumService

so far we only implemented ConfigKeyService, so move QuorumService into
the its only child class -- ConfigKeyService.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon/ConfigKeyService: move private member variable declaration to the end of class
Kefu Chai [Sat, 28 Nov 2020 11:15:34 +0000 (19:15 +0800)]
mon/ConfigKeyService: move private member variable declaration to the end of class

to follow https://google.github.io/styleguide/cppguide.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon: store a reference as member variable
Kefu Chai [Sat, 28 Nov 2020 11:08:26 +0000 (19:08 +0800)]
mon: store a reference as member variable

before this change, we always have a valid pointer as member variable.
so, a reference serve this purpose better.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon: use unique_ptr<> to manage lifecycle of Monitor::paxos
Kefu Chai [Sat, 28 Nov 2020 09:09:12 +0000 (17:09 +0800)]
mon: use unique_ptr<> to manage lifecycle of Monitor::paxos

it is less error-prone, and has better readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agorgw/lua: fixing incompatible declarations of CephContext 38459/head
Ronen Friedman [Sun, 6 Dec 2020 10:04:36 +0000 (12:04 +0200)]
rgw/lua: fixing incompatible declarations of CephContext

Existing forward declaration breaks OSD compilation (clang)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
4 years agolibrados: move definition of cct_deleter to .cc 38458/head
Kefu Chai [Sun, 6 Dec 2020 07:41:49 +0000 (15:41 +0800)]
librados: move definition of cct_deleter to .cc

so cct->get() and cct->put() are visually closer. this improves the
readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon: use TYPE_SEC for mon_scrub_interval 38457/head
Kefu Chai [Sun, 6 Dec 2020 08:02:33 +0000 (16:02 +0800)]
mon: use TYPE_SEC for mon_scrub_interval

* common/legacy_config_opts.h: drop mon_scrub_interval from legacy
  settings. as this option is not in critical path. so we can afford
  the overhead of look its value up in the map.
* common/options.cc: change mon_scrub_interval's type from TYPE_INT
  to TYPE_SECS, so we can use human friendly representations like
  "3 days" when specifying its value
* mon/Monitor.cc: adapt to the changes above.
* doc/rados: update the doc for "mon scrub interval" accordingly

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocommon/Timer: add SafeTimer::add_event_after() which accepts timespan
Kefu Chai [Sun, 6 Dec 2020 07:55:28 +0000 (15:55 +0800)]
common/Timer: add SafeTimer::add_event_after() which accepts timespan

easier to use when we are moving from the number of seconds to a
C++ timespan.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocompressor: pass string_view instead of string 38454/head
Kefu Chai [Sat, 21 Nov 2020 14:28:35 +0000 (22:28 +0800)]
compressor: pass string_view instead of string

this allows us to find by string without creating a std::string
instance, even if this string is not nul terminated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocompressor: put Compressor into TOPNSPC namespace
Kefu Chai [Sat, 21 Nov 2020 09:26:37 +0000 (17:26 +0800)]
compressor: put Compressor into TOPNSPC namespace

we want to add the support for on-the-wire compression to msgr v2, and
this feature will be shared by classic osd and crimson. but
Compressor.cc is also used by bluestore which is linked against by
crimson also. Compressor depends on CephContext which has two different
implementation in two namespaces for classic osd and crison.

so to avoid violating ODR, we should also put Compressor into two
different namespaces so it can be shared by alienstore and crimson in
the same executable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38442 from badone/wip-bump-fmt-package-min-version
Kefu Chai [Sun, 6 Dec 2020 02:59:31 +0000 (10:59 +0800)]
Merge pull request #38442 from badone/wip-bump-fmt-package-min-version

cmake: require fmt 6.0.0 and up

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38389 from trociny/wip-48412
Jason Dillaman [Sat, 5 Dec 2020 20:37:51 +0000 (15:37 -0500)]
Merge pull request #38389 from trociny/wip-48412

librbd: fix regression in object map diff request

Reviewed-by: Jason Dillaman <dillaman@hotmail.com>
4 years agoMerge pull request #35821 from Aran85/fix-ec-read
Kefu Chai [Sat, 5 Dec 2020 14:54:33 +0000 (22:54 +0800)]
Merge pull request #35821 from Aran85/fix-ec-read

osd/ECBackend: optimize remaining read as readop contain multiple objects

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
4 years agoMerge pull request #37543 from ianwatsonrh/master
Matt Benjamin [Sat, 5 Dec 2020 14:46:09 +0000 (09:46 -0500)]
Merge pull request #37543 from ianwatsonrh/master

docs: With the addition of STS x-amz-security-token is now supported

4 years agoMerge pull request #38401 from a16bitsysop/alpine-tests
Kefu Chai [Sat, 5 Dec 2020 14:12:48 +0000 (22:12 +0800)]
Merge pull request #38401 from a16bitsysop/alpine-tests

test/lazy-omap-stats: Fix compilation on alpine linux

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agodoc: build api docs with Read the Docs 38431/head
Kefu Chai [Thu, 3 Dec 2020 10:18:17 +0000 (18:18 +0800)]
doc: build api docs with Read the Docs

since we are able to build the python bindings using the stub
implementation of C binding, let's enable the API docs build.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind: check for READTHEDOC env variable
Kefu Chai [Thu, 3 Dec 2020 12:23:10 +0000 (20:23 +0800)]
pybind: check for READTHEDOC env variable

for building stub C binding if building in Read the Docs environment,
see https://docs.readthedocs.io/en/stable/builds.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoadmin/build-doc: do not build stub C binding anymore
Kefu Chai [Thu, 3 Dec 2020 11:16:11 +0000 (19:16 +0800)]
admin/build-doc: do not build stub C binding anymore

since the python binding is able to build the stub by themselves, there
is no need to do this manually.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/cephfs: use stub implementations when building document
Kefu Chai [Thu, 3 Dec 2020 09:33:52 +0000 (17:33 +0800)]
pybind/cephfs: use stub implementations when building document

also define a stub for rados.Rados right in cephfs.pyx, so the cython
compiler needs it. but it's cubersome to copy rados.pxd from rados
python binding when building cephfs python binding. because, if we
install a local python package using requirement.txt, pip does not allow
us to specify the include-directory for Cython. and cephfs/setup.py is
located out of the source tree when it is being built by pip, and unlike
in our CMake based build, which specifies --cython-include-dirs with
absolute directory, we don't have access to the root directory of
project in Read the Docs environment, so it's impossible for us to
locate pybind/rados in setup.py.

we could pass "--global-option" as part of package specifier in
requirements.txt, like:

cephfs --global-option="build_ext" --global-option="--for-doc"

or

cephfs --global-option="build_doc"

but then we will have to override or create a command
for interpreting the command line options.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/cephfs: drop duplicated declaration
Kefu Chai [Thu, 3 Dec 2020 10:04:04 +0000 (18:04 +0800)]
pybind/cephfs: drop duplicated declaration

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/cephfs: extract non-shared interface definitions
Kefu Chai [Thu, 3 Dec 2020 09:16:59 +0000 (17:16 +0800)]
pybind/cephfs: extract non-shared interface definitions

* c_cephfs.pxd: for cephfs C declarations
* types.pxd: for types exposed by libc and kernel

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rbd: use stub implementations when building document
Kefu Chai [Thu, 3 Dec 2020 09:07:58 +0000 (17:07 +0800)]
pybind/rbd: use stub implementations when building document

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rbd: extract non-shared interface definitions into c_rbd.pxd
Kefu Chai [Thu, 3 Dec 2020 08:11:21 +0000 (16:11 +0800)]
pybind/rbd: extract non-shared interface definitions into c_rbd.pxd

so it'd be simpler if we want to parse and generate the stub
for these declarations when building document where where the
annotations are used.

ctime.pxd is extracted so the time related declarations can be shared by
c_rbd.pxd and rbd.pyx.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rgw: use stub implementations when building document
Kefu Chai [Thu, 3 Dec 2020 08:06:22 +0000 (16:06 +0800)]
pybind/rgw: use stub implementations when building document

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rgw: s/bool/bint/
Kefu Chai [Thu, 3 Dec 2020 08:04:19 +0000 (16:04 +0800)]
pybind/rgw: s/bool/bint/

when compile a pure python cythonized binding, bool is not defined
because, i think, Cython does not include <stdbool.h> by default.
so use bint indead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rgw: extract non-shared interface definitions into c_rgw.pxd
Kefu Chai [Thu, 3 Dec 2020 07:23:35 +0000 (15:23 +0800)]
pybind/rgw: extract non-shared interface definitions into c_rgw.pxd

so it'd be simpler if we want to parse and generate the stub
for these declarations when building document where where the
annotations are used.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: use stub implementations when building document
Kefu Chai [Thu, 3 Dec 2020 06:40:42 +0000 (14:40 +0800)]
pybind/rados: use stub implementations when building document

* setup.py: inject "BUILD_DOC" into cython build context if "BUILD_DOC"
    env variable is set, this helps us to do conditional compilation.
    for instance, if we are building document, there is no need to
    use the header files or link against librados.so for building
    the python bindings.
* mock_rados.pxi: implement the mock functinons for their C counterparts
    in librados, so we can use them when building librados python
    binding for creating the document. Sphinx's autodoc extension
    reads annotation of the python package whose document is being
    built, after importing the python package into python runtime.
    but since we use Cython for creating our python binding,
    we have to provide the implementation of those referenced
    librados C API symbols. mock_rados.pxi implements them using Cython.
    the downside of this solution is that we need to mirror every
    function used by the Python binding by repeating them in both
    c_rados.pxd and mock_rados.pxi. the same will apply to other
    Ceph python bindings as long as they use C APIs not offered by
    libc or python runtime. so next step is to develop a simple
    parser which can be run at build time to create mock_*.pxi from
    c_*.pxd.
* rados.pyx: use mock_rados.pxi if BUILD_DOC, otherwise use
    c_rados.pyd. the latter requires a librados.so at runtime.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: check if BUILD_DOC in os.environ
Kefu Chai [Thu, 3 Dec 2020 03:13:23 +0000 (11:13 +0800)]
pybind/rados: check if BUILD_DOC in os.environ

no need to check if it is in keys()

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: remove unused import statement
Kefu Chai [Wed, 2 Dec 2020 14:47:57 +0000 (22:47 +0800)]
pybind/rados: remove unused import statement

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/rados: extract non-shared interface definitions into c_rados.pxd
Kefu Chai [Wed, 2 Dec 2020 12:43:04 +0000 (20:43 +0800)]
pybind/rados: extract non-shared interface definitions into c_rados.pxd

so it'd be simpler if we want to parse and generate the stub
for these declarations when building document where where the annotations
are used, but importable python bindgs of rados,ceph,rbd,cephfs are required.

also move the time.h declarations into ctime.pxd, are they can be shared
by the stub implementation and the non-stub one.

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