]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agodoc/conf.py: run ditaa with java 42577/head
Kefu Chai [Sun, 1 Aug 2021 17:41:47 +0000 (01:41 +0800)]
doc/conf.py: run ditaa with java

just in case, otherwise we could have

  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/42577/lib/python3.8/site-packages/sphinxcontrib/ditaa.py", line 200, in html_visit_ditaa
    render_ditaa_html(self, node, node['code'], node['options'])
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/42577/lib/python3.8/site-packages/sphinxcontrib/ditaa.py", line 177, in render_ditaa_html
    fname, outfn = render_ditaa(self, code, options, prefix)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/42577/lib/python3.8/site-packages/sphinxcontrib/ditaa.py", line 141, in render_ditaa
    p = Popen(ditaa_args, stdout=PIPE, stdin=PIPE, stderr=PIPE)
  File "/home/docs/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/docs/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/usr/bin/ditaa'

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years ago.readthedocs.yml: use ditaa instead of plantweb
Kefu Chai [Sun, 1 Aug 2021 16:37:19 +0000 (00:37 +0800)]
.readthedocs.yml: use ditaa instead of plantweb

use ditaa to reader ditaa images instead of relying plantweb service.
more stable this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years ago.readthedocs.yml: use python3.8
Kefu Chai [Sun, 1 Aug 2021 16:34:08 +0000 (00:34 +0800)]
.readthedocs.yml: use python3.8

to prepare the python3.8 migration

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42266 from dang/wip-dang-zipper-raw_obj
Daniel Gryniewicz [Fri, 30 Jul 2021 14:06:56 +0000 (10:06 -0400)]
Merge pull request #42266 from dang/wip-dang-zipper-raw_obj

Wip dang zipper raw obj

Reviewed-by: Soumya Koduri <skoduri@redhat.com>
3 years agoMerge pull request #42308 from jtlayton/wip-51644
Kefu Chai [Fri, 30 Jul 2021 11:03:19 +0000 (19:03 +0800)]
Merge pull request #42308 from jtlayton/wip-51644

osd: don't assert on zero-length OP_ZERO request

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
3 years agoMerge pull request #42523 from mgfritch/cephadm-fsid-validate
Kefu Chai [Fri, 30 Jul 2021 11:01:32 +0000 (19:01 +0800)]
Merge pull request #42523 from mgfritch/cephadm-fsid-validate

cephadm: validate `fsid` command arg

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #42528 from liewegas/fix-51816
Kefu Chai [Fri, 30 Jul 2021 11:00:30 +0000 (19:00 +0800)]
Merge pull request #42528 from liewegas/fix-51816

mon/LogMonitor: fix crash when cluster log file is not writeable

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #42538 from dsavineau/issue_51902
Kefu Chai [Fri, 30 Jul 2021 10:59:05 +0000 (18:59 +0800)]
Merge pull request #42538 from dsavineau/issue_51902

cephadm: don't use ctx.fsid for clean_cgroup

Reviewed-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #42558 from tchaikov/wip-crimson-cleanup
Kefu Chai [Fri, 30 Jul 2021 08:49:02 +0000 (16:49 +0800)]
Merge pull request #42558 from tchaikov/wip-crimson-cleanup

crimson/os: cleanups for building with Clang

Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os: do not capture unused variable 42558/head
Kefu Chai [Fri, 30 Jul 2021 06:57:47 +0000 (14:57 +0800)]
crimson/os: do not capture unused variable

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocrimson/os: reference this explicitly
Kefu Chai [Fri, 30 Jul 2021 06:56:50 +0000 (14:56 +0800)]
crimson/os: reference this explicitly

to silence false alarm from Clang that `this` is not used.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocrimson/os: do not capture labels
Kefu Chai [Fri, 30 Jul 2021 05:40:09 +0000 (13:40 +0800)]
crimson/os: do not capture labels

structured binding does not define variables, so we cannot capture them
without defining variables in capture list.

in this change, instead of using a map<> for defining labels, just
create labels on the fly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42556 from tchaikov/wip-fair-mutex
Kefu Chai [Fri, 30 Jul 2021 06:30:09 +0000 (14:30 +0800)]
Merge pull request #42556 from tchaikov/wip-fair-mutex

common: add ceph::fair_mutex

Reviewed-by: Xiubo Li <xiubli@redhat.com>
3 years agoMerge pull request #42539 from cyx1231st/wip-seastore-cache-metrics-2
Kefu Chai [Fri, 30 Jul 2021 05:22:13 +0000 (13:22 +0800)]
Merge pull request #42539 from cyx1231st/wip-seastore-cache-metrics-2

crimson/os/seastore/cache: refine metrics

Reviewed-by: Samuel Just <sjust@redhat.com>
3 years agocommon: add ceph::fair_mutex 42556/head
Kefu Chai [Fri, 30 Jul 2021 04:44:52 +0000 (12:44 +0800)]
common: add ceph::fair_mutex

a mutex which enqueues and wakes up the waiters in FIFO order, to
ensure the fairness of the mutex.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocrimson/os/seastore: reassign extent_types_t values and remove extent_type_to_index() 42539/head
Yingxin Cheng [Thu, 29 Jul 2021 06:52:20 +0000 (14:52 +0800)]
crimson/os/seastore: reassign extent_types_t values and remove extent_type_to_index()

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore/cache: misc cleanup to metrics
Yingxin Cheng [Wed, 28 Jul 2021 01:36:20 +0000 (09:36 +0800)]
crimson/os/seastore/cache: misc cleanup to metrics

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore/cache: remove derived metrics
Yingxin Cheng [Tue, 27 Jul 2021 08:50:52 +0000 (16:50 +0800)]
crimson/os/seastore/cache: remove derived metrics

Only keep the basic metrics to minimize the total number of metrics.

Derived metrics can be numerous according to different needs and can be
confusing with labels.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore/cache: remove counter labels
Yingxin Cheng [Tue, 27 Jul 2021 08:45:03 +0000 (16:45 +0800)]
crimson/os/seastore/cache: remove counter labels

Do not label metrics by counter type which could be confusing.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore/cache: cleanup, replace unordered_map by array
Yingxin Cheng [Tue, 27 Jul 2021 08:36:44 +0000 (16:36 +0800)]
crimson/os/seastore/cache: cleanup, replace unordered_map by array

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agoMerge pull request #40965 from rokj/patch-3
Ilya Dryomov [Thu, 29 Jul 2021 21:54:44 +0000 (23:54 +0200)]
Merge pull request #40965 from rokj/patch-3

doc: mention copying keyrings and adjust node names in manual deployment example

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
3 years agoMerge pull request #42432 from tchaikov/wip-mon-crush-cleanup
Kefu Chai [Thu, 29 Jul 2021 15:40:03 +0000 (23:40 +0800)]
Merge pull request #42432 from tchaikov/wip-mon-crush-cleanup

mon: let CrushWrapper::get_validated_type_id() return an optional<>

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoMerge pull request #42524 from guits/cv_wait_destroy_tests
Dimitri Savineau [Thu, 29 Jul 2021 13:42:15 +0000 (09:42 -0400)]
Merge pull request #42524 from guits/cv_wait_destroy_tests

ceph-volume/tests: retry when destroying osd

3 years agoMerge pull request #42515 from rhcs-dashboard/decouple-unit-tests-from-build-dir
Ernesto Puerta [Thu, 29 Jul 2021 12:47:24 +0000 (14:47 +0200)]
Merge pull request #42515 from rhcs-dashboard/decouple-unit-tests-from-build-dir

mgr/dashboard: backend unit tests: decouple from build dir

Reviewed-by: Waad Alkhoury <walkhour@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
3 years agoMerge pull request #42516 from tchaikov/wip-win32-snappy
Kefu Chai [Thu, 29 Jul 2021 09:15:16 +0000 (17:15 +0800)]
Merge pull request #42516 from tchaikov/wip-win32-snappy

win32_deps_build.sh: bump snappy version to 1.1.9

Reviewed-by: Nathan Cutler <ncutler@suse.com>
3 years agodoc: adding missing command. changed node naming. 40965/head
Rok Jaklič [Wed, 21 Apr 2021 14:35:07 +0000 (16:35 +0200)]
doc: adding missing command. changed node naming.

Signed-off-by: Rok Jaklič <rokj@rasca.net>
3 years agocrimson/os/seastore/cache: cleanup, rename to get_by_src()
Yingxin Cheng [Tue, 27 Jul 2021 08:10:51 +0000 (16:10 +0800)]
crimson/os/seastore/cache: cleanup, rename to get_by_src()

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore: measure cache hit ratio by src
Yingxin Cheng [Tue, 27 Jul 2021 08:04:28 +0000 (16:04 +0800)]
crimson/os/seastore: measure cache hit ratio by src

Remove excessive amount of cache hit/access metrics by extent type.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore: measure committed efforts by extent
Yingxin Cheng [Tue, 27 Jul 2021 07:39:05 +0000 (15:39 +0800)]
crimson/os/seastore: measure committed efforts by extent

In order to cross-check the writes at segment manager level, and
evaluate the write amplification from each sub-component.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agowin32_deps_build.sh: only clone the tip of required tag 42516/head
Kefu Chai [Wed, 28 Jul 2021 09:12:33 +0000 (17:12 +0800)]
win32_deps_build.sh: only clone the tip of required tag

no need to clone the whole repo, just clone the tip of the specified
tag. this saves the bandwidth, disk IO and precious time.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agowin32_deps_build.sh: bump snappy version to 1.1.9
Kefu Chai [Wed, 28 Jul 2021 09:01:06 +0000 (17:01 +0800)]
win32_deps_build.sh: bump snappy version to 1.1.9

in snappy, the commit of 26102a0c66175bc39edbf484c994a21902e986dc
fixes the SNAPPY_VERSION generation. and this commit was included by
v1.1.8 and v1.1.9.

also, in v1.1.9, a change was introduced, where the function signature
was changed, and more importantly, this change is not backward
compatible:

<   bool GetUncompressedLength(Source* source, uint32_t* result);
---
>   bool GetUncompressedLength(Source* source, uint32* result);

see also, https://tracker.ceph.com/issues/50934

so we check SNAPPY_VERSION to tell if we should use `uint32_t` or
`uint32`.

in this change, snappy version used to build win32 client is bumped
to the latest stable version, v1.1.9, to include the fix of
SNAPPY_VERSION. this paves the road to fix of https://tracker.ceph.com/issues/50934

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocompression/snappy: use uint32_t to be compatible with 1.1.9
Nathan Cutler [Tue, 27 Jul 2021 13:27:58 +0000 (15:27 +0200)]
compression/snappy: use uint32_t to be compatible with 1.1.9

The snappy project made the following change in snappy.h between version 1.1.8
and 1.1.9:

<   bool GetUncompressedLength(Source* source, uint32_t* result);
---
>   bool GetUncompressedLength(Source* source, uint32* result);

This causes Ceph to FTBFS with snappy 1.1.9.

Thanks to Chris Denice for bringing this to our attention via Redmine.

Fixes: https://tracker.ceph.com/issues/50934
Signed-off-by: Nathan Cutler <ncutler@suse.com>
3 years agoMerge pull request #42442 from badone/wip-insights-reports-non-persistent-storage
Brad Hubbard [Wed, 28 Jul 2021 23:19:32 +0000 (09:19 +1000)]
Merge pull request #42442 from badone/wip-insights-reports-non-persistent-storage

Don't persist report data

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agocephadm: don't use ctx.fsid for clean_cgroup 42538/head
Dimitri Savineau [Wed, 28 Jul 2021 20:52:05 +0000 (16:52 -0400)]
cephadm: don't use ctx.fsid for clean_cgroup

The clean_cgroup method assumes that the ctx.fsid is set while this is
true for the bootstrap command, it isn't set for adopt or deploy commands
(and maybe others).

This ends up to the adopt command to fails:

Traceback (most recent call last):
  File "/sbin/cephadm", line 8301, in <module>
    main()
  File "/sbin/cephadm", line 8289, in main
    r = ctx.func(ctx)
  File "/sbin/cephadm", line 1764, in _default_image
    return func(ctx)
  File "/sbin/cephadm", line 5091, in command_adopt
    command_adopt_ceph(ctx, daemon_type, daemon_id, fsid)
  File "/sbin/cephadm", line 5299, in command_adopt_ceph
    osd_fsid=osd_fsid)
  File "/sbin/cephadm", line 2884, in deploy_daemon_units
    clean_cgroup(ctx, unit_name)
  File "/sbin/cephadm", line 2724, in clean_cgroup
    if not ctx.fsid:
  File "/sbin/cephadm", line 155, in __getattr__
    return super().__getattribute__(name)
AttributeError: 'CephadmContext' object has no attribute 'fsid'

Since we already have the fsid value in deploy_daemon_units (which calls
clean_cgroup) then we can pass the fsid value directly.

This fixes a regression introduced by 1fee255

Fixes: https://tracker.ceph.com/issues/51902
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
3 years agoMerge pull request #42527 from ceph/ljflores-patch-3
Neha Ojha [Wed, 28 Jul 2021 20:00:32 +0000 (13:00 -0700)]
Merge pull request #42527 from ceph/ljflores-patch-3

doc/mgr/telemetry: fix formatting problem

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge PR #42349 into master
Patrick Donnelly [Wed, 28 Jul 2021 17:45:08 +0000 (10:45 -0700)]
Merge PR #42349 into master

* refs/pull/42349/head:
mon/MDSMonitor: propose if FSMap struct_v is too old
mon/MDSMonitor: give a proper error message if FSMap struct_v is too old
mds/FSMap: use DECODE_OLDEST to gate FSMap version
qa: add tests for fs dump of epoch and trimming
qa: add file system support for dumping epoch
mon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch
mon: add debugging for trimming methods
mon: fix debug spacing
qa: add nofs upgrade suite

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
3 years agoMerge PR #42199 into master
Patrick Donnelly [Wed, 28 Jul 2021 17:36:35 +0000 (10:36 -0700)]
Merge PR #42199 into master

* refs/pull/42199/head:
mds: add debugging when rejecting mksnap with EPERM

Reviewed-by: Milind Changire <mchangir@redhat.com>
3 years agoMerge PR #41025 into master
Patrick Donnelly [Wed, 28 Jul 2021 17:34:12 +0000 (10:34 -0700)]
Merge PR #41025 into master

* refs/pull/41025/head:
qa: wait pgs to be clean before using the pools
qa: ignore PG_RECOVERY_FULL and PG_DEGRADED for mds-full
qa: wait more time since there have many more pgs than before
qa: do not multiple the full ratio twice
qa: do not raise for kclient for _fsync test
qa: use the pg autoscale mode to calcuate the pg_num
qa: set the object_size to 1M
qa: move the is_full() to parent class

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoMerge PR #38388 into master
Patrick Donnelly [Wed, 28 Jul 2021 17:30:31 +0000 (10:30 -0700)]
Merge PR #38388 into master

* refs/pull/38388/head:
mds: check rejoin_ack_gather before enter rejoin_gather_finish

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
3 years agoMerge pull request #42453 from sebastian-philipp/githubmap-rh
Kefu Chai [Wed, 28 Jul 2021 17:01:03 +0000 (01:01 +0800)]
Merge pull request #42453 from sebastian-philipp/githubmap-rh

.githubmap: Update Sebastian Wagner's mapping

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: David Galloway <dgallowa@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42501 from ybwang0211/doc-cap
Kefu Chai [Wed, 28 Jul 2021 16:59:10 +0000 (00:59 +0800)]
Merge pull request #42501 from ybwang0211/doc-cap

doc/man: add missing right parenthesis in manpage.

Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42495 from hjwsm1989/wip-51842
Kefu Chai [Wed, 28 Jul 2021 16:32:00 +0000 (00:32 +0800)]
Merge pull request #42495 from hjwsm1989/wip-51842

crush: cancel upmaps with up set size != pool size

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
3 years agoMerge pull request #42511 from adk3798/shutil-copy-exception
Kefu Chai [Wed, 28 Jul 2021 16:28:53 +0000 (00:28 +0800)]
Merge pull request #42511 from adk3798/shutil-copy-exception

cephadm: don't fail hard on SameFileError during shutil.copy

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #40337 from ideepika/wip-bugzilla-1857447
Kefu Chai [Wed, 28 Jul 2021 16:21:49 +0000 (00:21 +0800)]
Merge pull request #40337 from ideepika/wip-bugzilla-1857447

mon/PGMap: remove DIRTY field in `ceph df detail` when cache tiering  is not in use

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #42508 from cybozu/kv-rocksdbstore-enrich-debug-message
Kefu Chai [Wed, 28 Jul 2021 16:20:09 +0000 (00:20 +0800)]
Merge pull request #42508 from cybozu/kv-rocksdbstore-enrich-debug-message

kv/RocksDBStore: enrich debug message

Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42500 from ybwang0211/doc-list-get-attr
Kefu Chai [Wed, 28 Jul 2021 16:19:51 +0000 (00:19 +0800)]
Merge pull request #42500 from ybwang0211/doc-list-get-attr

tools/rados: improve the usage message of {get,set}omapaheader

Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoRGW - Zipper - MultipartUpload 42266/head
Daniel Gryniewicz [Tue, 6 Jul 2021 14:32:19 +0000 (10:32 -0400)]
RGW - Zipper - MultipartUpload

Create a MultipartUpload object in the Zipper API.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
3 years agoRemove get_raw_obj() from Object
Daniel Gryniewicz [Mon, 14 Jun 2021 14:58:26 +0000 (10:58 -0400)]
Remove get_raw_obj() from Object

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
3 years agorgw - Configure ceph.conf for orphan-list
Daniel Gryniewicz [Mon, 12 Jul 2021 19:08:13 +0000 (15:08 -0400)]
rgw - Configure ceph.conf for orphan-list

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
3 years agomon/LogMonitor: fix crash when cluster log file is not writeable 42528/head
Sage Weil [Wed, 28 Jul 2021 15:45:19 +0000 (11:45 -0400)]
mon/LogMonitor: fix crash when cluster log file is not writeable

If we are in this block, then p == channel_fds.end() and p->first is not
valid.

Also, no need to populate channel_fds with an fd of -1.

Fixes: https://tracker.ceph.com/issues/51816
Signed-off-by: Sage Weil <sage@newdream.net>
3 years agodoc/mgr/telemetry: fix formatting problem 42527/head
Laura Flores [Wed, 28 Jul 2021 15:11:17 +0000 (10:11 -0500)]
doc/mgr/telemetry: fix formatting problem

There was strange bolding and bullet point placement due to a missing new line in the perf description.

Signed-off-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #42502 from tchaikov/wip-bloomfilter-cleanups
Kefu Chai [Wed, 28 Jul 2021 14:56:52 +0000 (22:56 +0800)]
Merge pull request #42502 from tchaikov/wip-bloomfilter-cleanups

include/intarith, common/bloom_filter: add popcount() and cleanups

Reviewed-by: Sage Weil <sage@redhat.com>
3 years agoceph-volume/tests: retry when destroying osd 42524/head
Guillaume Abrioux [Wed, 28 Jul 2021 14:22:09 +0000 (16:22 +0200)]
ceph-volume/tests: retry when destroying osd

Sometimes, it can happen that the osds being destroyed in those tests
are not yet marked as 'down' for some reason. Let's add some retries on
those tasks to avoid CI failures.

Fixes: https://tracker.ceph.com/issues/51903
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agomon/MDSMonitor: propose if FSMap struct_v is too old 42349/head
Patrick Donnelly [Thu, 15 Jul 2021 01:02:20 +0000 (18:02 -0700)]
mon/MDSMonitor: propose if FSMap struct_v is too old

To flush older versions which may still be an empty MDSMap (for clusters
that have never used CephFS), we need to force a proposal so older
versions of the struct are trimmed.

This is the main fix of this branch. We removed code which processed old
encodings of the MDSMap in the mon store via 60bc524. That broke old
ceph clusters which never used CephFS (see cited ticket below).  This is
because the initial epoch is an empty MDSMap (back in Infernalis/Hammer)
that is never updated. So, the fix here is to just do proposals
periodically until all of the old structs are automatically trimmed by
the mons.

Fixes: 60bc524827bac072658203e56b1fa3dede9641c5
Fixes: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon/MDSMonitor: give a proper error message if FSMap struct_v is too old
Patrick Donnelly [Thu, 15 Jul 2021 01:00:24 +0000 (18:00 -0700)]
mon/MDSMonitor: give a proper error message if FSMap struct_v is too old

Fixes: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomds/FSMap: use DECODE_OLDEST to gate FSMap version
Patrick Donnelly [Thu, 15 Jul 2021 00:55:40 +0000 (17:55 -0700)]
mds/FSMap: use DECODE_OLDEST to gate FSMap version

This throws a proper exception which can be handled.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoqa: add tests for fs dump of epoch and trimming
Patrick Donnelly [Wed, 14 Jul 2021 21:00:09 +0000 (14:00 -0700)]
qa: add tests for fs dump of epoch and trimming

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoqa: add file system support for dumping epoch
Patrick Donnelly [Wed, 14 Jul 2021 20:59:48 +0000 (13:59 -0700)]
qa: add file system support for dumping epoch

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch
Patrick Donnelly [Wed, 14 Jul 2021 20:31:21 +0000 (13:31 -0700)]
mon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch

The PaxosService code already excludes the value returned by
PaxosService::get_trim_to as the upper bound of the range of epochs to
trim. Without this fix, you need to set mon_mds_force_trim_to to one
greater than the epoch you want to trim _and_ force the current epoch to
be one greater than that; the net result being that you can only force
trimming up to 2 epochs behind the current epoch.

This change is helpful for resolving issue 51673, but not strictly
necessary.

Related-to: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon: add debugging for trimming methods
Patrick Donnelly [Wed, 14 Jul 2021 19:04:03 +0000 (12:04 -0700)]
mon: add debugging for trimming methods

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon: fix debug spacing
Patrick Donnelly [Wed, 14 Jul 2021 20:23:47 +0000 (13:23 -0700)]
mon: fix debug spacing

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoqa: add nofs upgrade suite
Patrick Donnelly [Wed, 14 Jul 2021 16:16:26 +0000 (09:16 -0700)]
qa: add nofs upgrade suite

This adds an upgrade suite to ensure that a Ceph cluster without a
CephFS file system does not blow up on upgrade (in particular, that the
MDSMonitor does not trip). This was developed to potentially reproduce
tracker 51673 but the actual cause for that issue was an old encoding
for the MDSMap which was obsoleted in Pacific. You must create a cluster
older than the FSMap (~Hammer or Infernalis) to reproduce. In any case,
this upgrade suite may be useful in the future so let's keep it!

Related-to: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agocephadm: validate fsid during ceph-volume command 42523/head
Michael Fritch [Tue, 27 Jul 2021 21:56:25 +0000 (15:56 -0600)]
cephadm: validate fsid during ceph-volume command

Signed-off-by: Michael Fritch <mfritch@suse.com>
3 years agocephadm: validate fsid during shell command
Michael Fritch [Mon, 26 Jul 2021 22:58:54 +0000 (16:58 -0600)]
cephadm: validate fsid during shell command

Signed-off-by: Michael Fritch <mfritch@suse.com>
3 years agotest: add a test for zero-length OP_ZERO request 42308/head
Jeff Layton [Tue, 13 Jul 2021 15:50:48 +0000 (11:50 -0400)]
test: add a test for zero-length OP_ZERO request

This triggered an assertion before. Verify that it's a no-op now.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
3 years agomgr/dashboard: backend unit tests: decouple from build dir 42515/head
Alfonso Martínez [Wed, 28 Jul 2021 07:51:52 +0000 (09:51 +0200)]
mgr/dashboard: backend unit tests: decouple from build dir

After https://github.com/ceph/ceph/pull/42255 some unit tests got coupled
to the frontend folder of the build dir.
Backend unit tests do not need a build folder: they only test our business logic.

Signed-off-by: Alfonso Martínez <almartin@redhat.com>
3 years agoMerge pull request #42169 from Matan-B/lua-nats-example
Yuval Lifshitz [Wed, 28 Jul 2021 07:16:30 +0000 (10:16 +0300)]
Merge pull request #42169 from Matan-B/lua-nats-example

rgw: Add an example for lua scripting

3 years agoMerge pull request #42350 from TRYTOBE8TME/wip-rgw-notification
Yuval Lifshitz [Wed, 28 Jul 2021 07:13:10 +0000 (10:13 +0300)]
Merge pull request #42350 from TRYTOBE8TME/wip-rgw-notification

rgw/notifications: Change in multipart upload notification behavior

3 years agocommon/bloom_filter: move bloom_filter::density() to .cc 42502/head
Kefu Chai [Tue, 27 Jul 2021 10:13:36 +0000 (18:13 +0800)]
common/bloom_filter: move bloom_filter::density() to .cc

for faster compilation, also, bloom_filter::density()
is not sitting in the critical paths, so no need to make it an
inline function.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42389 from asannes/ingress-fix
Kefu Chai [Wed, 28 Jul 2021 04:48:04 +0000 (12:48 +0800)]
Merge pull request #42389 from asannes/ingress-fix

mgr/cephadm: ingress: fix typo in spec.virtual_interface_networks reference

Reviewed-by: Sage Weil <sage@redhat.com>
3 years agoMerge pull request #42510 from rzarzynski/wip-crimson-use-random-nonce
Kefu Chai [Wed, 28 Jul 2021 03:06:11 +0000 (11:06 +0800)]
Merge pull request #42510 from rzarzynski/wip-crimson-use-random-nonce

crimson/osd: fix misdirecting msgs when an OSD flips at Sepia.

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agodoc/man: add missing right parenthesis in manpage. 42501/head
wangyingbin [Tue, 27 Jul 2021 07:25:34 +0000 (15:25 +0800)]
doc/man: add missing right parenthesis in manpage.

Signed-off-by: wangyingbin <ybwang0211@163.com>
3 years agocrush: cancel upmaps with up set size > pool size 42495/head
huangjun [Tue, 27 Jul 2021 01:32:36 +0000 (09:32 +0800)]
crush: cancel upmaps with up set size > pool size

Fixes: https://tracker.ceph.com/issues/51842
Signed-off-by: huangjun <huangjun@xsky.com>
3 years agoMerge pull request #42322 from ljflores/wip-lflores-telemetry-docs
Josh Durgin [Wed, 28 Jul 2021 00:31:33 +0000 (17:31 -0700)]
Merge pull request #42322 from ljflores/wip-lflores-telemetry-docs

doc/mgr/telemetry: update Telemetry Module docs to include perf channel

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Zac Dover <zac.dover@gmail.com>
3 years agoMerge pull request #42492 from zdover23/wip-doc-rados-top-level-section-2021-07-26
Josh Durgin [Wed, 28 Jul 2021 00:28:58 +0000 (17:28 -0700)]
Merge pull request #42492 from zdover23/wip-doc-rados-top-level-section-2021-07-26

doc/rados: rewrite index.rst

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
3 years agoosd: don't assert on zero-length OP_ZERO request
Jeff Layton [Tue, 13 Jul 2021 13:50:50 +0000 (09:50 -0400)]
osd: don't assert on zero-length OP_ZERO request

I was able to crash the OSD by sending it a CEPH_OSD_OP_ZERO request
that had an op.extent.length that was 0. Convert that to a no-op
instead.

Fixes: https://tracker.ceph.com/issues/51644
Signed-off-by: Jeff Layton <jlayton@redhat.com>
3 years agoMerge pull request #42473 from tchaikov/wip-cmake-rgw-cleanup
Casey Bodley [Tue, 27 Jul 2021 18:31:40 +0000 (14:31 -0400)]
Merge pull request #42473 from tchaikov/wip-cmake-rgw-cleanup

cmake: make rgw_common a static library

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agocephadm: don't fail hard on SameFileError during shutil.copy 42511/head
Adam King [Wed, 21 Jul 2021 18:42:44 +0000 (14:42 -0400)]
cephadm: don't fail hard on SameFileError during shutil.copy

Fixes: https://tracker.ceph.com/issues/51829
Signed-off-by: Adam King <adking@redhat.com>
3 years agoMerge PR #42406 into master
Sage Weil [Tue, 27 Jul 2021 18:11:56 +0000 (14:11 -0400)]
Merge PR #42406 into master

* refs/pull/42406/head:
mgr/nfs: remove unused 'realm' arg for 'nfs export create rgw'
doc/mgr/rook: update title
doc/mgr/nfs: reference customizing ingress
doc/mgr/nfs: add section for manual ganesha config; reframe
doc/mgr/nfs: document ingress in more detail
doc/mgr/nfs: typo
doc/mgr/nfs: add note about incomplete ingress
qa/suites/orch/cephadm: add rgw nfs export test
mgr/cephadm: ingress: tolerate no daemons
mgr/nfs: add --squash option to 'nfs export create rgw ...'
mgr/nfs: use bucket owner creds for rgw bucket export
mgr/cephadm: use new CEPH_IMAGE_TYPES for all daemons using ceph container image
qa/tasks/python: simple task to run python code
doc/mgr/nfs: revisions
mgr/nfs/export: nicer exceptions on cap update

Reviewed-by: Varsha Rao <varao@redhat.com>
3 years agocrimson/osd: make the get_nonce() static. 42510/head
Radoslaw Zarzynski [Tue, 27 Jul 2021 16:27:11 +0000 (16:27 +0000)]
crimson/osd: make the get_nonce() static.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agocrimson/osd: print OSD::nonce on start-up.
Radoslaw Zarzynski [Tue, 27 Jul 2021 15:35:21 +0000 (15:35 +0000)]
crimson/osd: print OSD::nonce on start-up.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agocrimson/osd: fix misdirecting msgs when an OSD flips at Sepia.
Radoslaw Zarzynski [Tue, 27 Jul 2021 16:24:55 +0000 (16:24 +0000)]
crimson/osd: fix misdirecting msgs when an OSD flips at Sepia.

For description please refer to:
  * https://gist.github.com/rzarzynski/6cbc20fb28d7ac096ecc4b68500454bf#gistcomment-3830762,
  * https://gist.github.com/rzarzynski/6cbc20fb28d7ac096ecc4b68500454bf#gistcomment-3830939.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoMerge pull request #42476 from tchaikov/wip-crimson-more-aliens
Kefu Chai [Tue, 27 Jul 2021 15:58:55 +0000 (23:58 +0800)]
Merge pull request #42476 from tchaikov/wip-crimson-more-aliens

doc, vstart.sh: adapt to the generalize AlienStore support

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoMerge pull request #42222 from flipkart-incubator/aws_sse_s3
Casey Bodley [Tue, 27 Jul 2021 14:52:23 +0000 (10:52 -0400)]
Merge pull request #42222 from flipkart-incubator/aws_sse_s3

rgw: Introduce BucketEncryption APIs to support SSE-S3 feature

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agodoc/dev/crimson: document cyanstore and alienstore 42476/head
Kefu Chai [Sun, 25 Jul 2021 06:30:02 +0000 (14:30 +0800)]
doc/dev/crimson: document cyanstore and alienstore

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agomgr/nfs: remove unused 'realm' arg for 'nfs export create rgw' 42406/head
Sage Weil [Tue, 27 Jul 2021 14:46:25 +0000 (10:46 -0400)]
mgr/nfs: remove unused 'realm' arg for 'nfs export create rgw'

This argument is not used.  The rgw exports currently only work on the
default realm.

Signed-off-by: Sage Weil <sage@newdream.net>
3 years agodoc/mgr/rook: update title
Sage Weil [Mon, 26 Jul 2021 20:14:44 +0000 (16:14 -0400)]
doc/mgr/rook: update title

Signed-off-by: Sage Weil <sage@newdream.net>
3 years agodoc/mgr/nfs: reference customizing ingress
Sage Weil [Mon, 26 Jul 2021 20:12:45 +0000 (16:12 -0400)]
doc/mgr/nfs: reference customizing ingress

Link to the cephadm docs on modifying the service directly.

Signed-off-by: Sage Weil <sage@newdream.net>
3 years agodoc/mgr/nfs: add section for manual ganesha config; reframe
Sage Weil [Mon, 26 Jul 2021 20:04:15 +0000 (16:04 -0400)]
doc/mgr/nfs: add section for manual ganesha config; reframe

This documentation is incomplete because this mode of operation is not
tested/validated.

Signed-off-by: Sage Weil <sage@newdream.net>
3 years agokv/RocksDBStore: enrich debug message 42508/head
Satoru Takeuchi [Tue, 27 Jul 2021 13:58:15 +0000 (13:58 +0000)]
kv/RocksDBStore: enrich debug message

It's better to print why ListColumnFamilies() failed.

Signed-off-by: Toshikuni Fukaya <toshiq2@gmail.com>
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
3 years agotools/rados: improve the usage message of {get,set}omapaheader 42500/head
wangyingbin [Tue, 27 Jul 2021 06:37:12 +0000 (14:37 +0800)]
tools/rados: improve the usage message of {get,set}omapaheader

Signed-off-by: wangyingbin <ybwang0211@163.com>
3 years agocommon/bloom_filter: use popcount() to implement density()
Kefu Chai [Tue, 27 Jul 2021 06:58:01 +0000 (14:58 +0800)]
common/bloom_filter: use popcount() to implement density()

instead of counting the bits using a loop, it'd be more efficient to do
this using the SIMD instruction.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocommon/bloom_filter: s/bits_per_char/CHAR_BIT/
Kefu Chai [Tue, 27 Jul 2021 07:20:07 +0000 (15:20 +0800)]
common/bloom_filter: s/bits_per_char/CHAR_BIT/

use macro defined by standard libary instead of inventing our own.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agoinclude/intarith: add popcount()
Kefu Chai [Tue, 27 Jul 2021 05:54:26 +0000 (13:54 +0800)]
include/intarith: add popcount()

for counting "1" in an integer.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agotest/test_intarith: adapt to the change in intarith.h
Kefu Chai [Tue, 27 Jul 2021 06:24:18 +0000 (14:24 +0800)]
test/test_intarith: adapt to the change in intarith.h

back in 2623fec1cdd5fd9b15ee67c4b115385c67129ef4, the vaiants of, for
instance, ctz() are consolidated to a single template. so the
ctz<>() dispatches by the size of argument after that change.
but the tests were not updated accordingly.

in this change:

* the tests are updated to use the template.
* instead of using integer literal postfix, use the macros like
  UINT64_C to define integer constants for better portability on
  different architectures where the lengths of integer *might* be
  different from amd64. also, it's more readable than postfixes
  like ULL in this context, as we really care about the exact
  length of an integer in this context when counting the leading
  zeros.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocmake: add unittest_intarith back
Kefu Chai [Tue, 27 Jul 2021 05:53:24 +0000 (13:53 +0800)]
cmake: add unittest_intarith back

this unit test was missed when we migrated from autotools to CMake.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocommon/bloom_filter: use vector for holding bits
Kefu Chai [Tue, 27 Jul 2021 04:58:54 +0000 (12:58 +0800)]
common/bloom_filter: use vector for holding bits

to be more consistent with the upstream at https://github.com/ArashPartow/bloom/blob/master/bloom_filter.hpp
and for better readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocommon/bloom_filter: use "using" for better readability
Kefu Chai [Tue, 27 Jul 2021 04:15:19 +0000 (12:15 +0800)]
common/bloom_filter: use "using" for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocommon/bloom_filter: return by return values not by input params
Kefu Chai [Tue, 27 Jul 2021 03:57:46 +0000 (11:57 +0800)]
common/bloom_filter: return by return values not by input params

it'd be easier for the static analyzer (like GCC), to reason about if
a variable is initialized before being used.

this change also helps to improve the readability, and to silence the
false alarm like:

In file included from ../src/os/bluestore/BlueStore.h:42,
                 from ../src/os/bluestore/BlueStore.cc:26:
../src/common/bloom_filter.hpp: In member function 'void std::vector<_Tp, _Alloc>::_M_fill_insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = bloom_filter; _Alloc = mempool::pool_allocator<mempool::mempool_bluestore_fsck, bloom_filter>]':
../src/common/bloom_filter.hpp:118:46: warning: '*((void*)(& __tmp)+8).bloom_filter::table_size_' may be used uninitialized in this function [-Wmaybe-uninitialized]
  118 |  mempool::bloom_filter::alloc_byte.deallocate(bit_table_, table_size_);
      |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42457 from cyx1231st/wip-seastore-segment-metrics
Kefu Chai [Tue, 27 Jul 2021 06:37:33 +0000 (14:37 +0800)]
Merge pull request #42457 from cyx1231st/wip-seastore-segment-metrics

crimson/seastore: implement metrics in BlockSegmentManager

Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>