]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agocephfs-shell: move source to separate subdirectory 47401/head
Tim Serong [Thu, 21 Jul 2022 05:55:19 +0000 (15:55 +1000)]
cephfs-shell: move source to separate subdirectory

This ensures the package discovery done by python setuptools >= 61
doesn't get confused when building cephfs-shell and cephfs-top.
This commit moves cephfs-shell to a separate "shell" subdirectory,
which is the same approach we've already got with the cephfs-top
tool being in a separate "top" subdirectory.

Fixes: https://tracker.ceph.com/issues/56658
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit dc69033763cc116c6ccdf1f97149a74248691042)

3 years agoMerge pull request #47803 from tchaikov/wip-pacific-update-fio
Kefu Chai [Tue, 6 Sep 2022 00:24:15 +0000 (08:24 +0800)]
Merge pull request #47803 from tchaikov/wip-pacific-update-fio

pacific: Updates to fix `make check` failures

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #47956 from zdover23/wip-doc-2022-09-04-backport-47841-to-pacific
zdover23 [Mon, 5 Sep 2022 06:23:26 +0000 (16:23 +1000)]
Merge pull request #47956 from zdover23/wip-doc-2022-09-04-backport-47841-to-pacific

pacific: doc/start: update documenting-ceph branch names

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/start: update documenting-ceph branch names 47956/head
Zac Dover [Tue, 30 Aug 2022 11:48:08 +0000 (21:48 +1000)]
doc/start: update documenting-ceph branch names

This PR updates the branch names in the
documenting-ceph.rst file. It gets rid of all references
to the "master" branch, and updates the language to
reflect the state of play in 2022.

inb4: This PR merely removes the most egregious inaccuracies,
the ones that were most readily evident on a cursory perusal.
The full text remains to be carefully read and fitted together
with care.

I had to start somewhere.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 7bc6262547c82dd6519e4099bfc4f082f14343ac)

3 years agoMerge pull request #47948 from adk3798/wip-57412-pacific
Adam King [Sat, 3 Sep 2022 19:43:53 +0000 (15:43 -0400)]
Merge pull request #47948 from adk3798/wip-57412-pacific

pacific: doc/cephadm/services: fix example for specifying rgw placement

Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
3 years agodoc/cephadm/services: fix example for specifying rgw placement 47948/head
Redouane Kachach [Fri, 2 Sep 2022 09:57:43 +0000 (11:57 +0200)]
doc/cephadm/services: fix example for specifying rgw placement
fixes: https://tracker.ceph.com/issues/56953

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 1ed4c30876262c8890247325eb84ff46621d34fe)

3 years agocmake: link denc-mod-rgw against Boost::filesystem 47803/head
Kefu Chai [Fri, 2 Sep 2022 12:37:26 +0000 (20:37 +0800)]
cmake: link denc-mod-rgw against Boost::filesystem

to address the runtime link failure.

this change is not cherry-picked from main branch. as, in main branch,
the Boost::filesystem linkage is pulled in by rgw_common, which was
changed to a static library in 43d10b9e44ca50700e9076a47f2c38b360d1d632.
but this change is not included in pacific. so rgw added the linkage
via rgw_libs CMake variable. unfortunately, the lexical scope of this
variable does not not include tools/ceph-dencoder/CMakeLists.txt, so
we have to add this linkage manually here.

Signed-off-by: Tim Serong <tserong@suse.com>
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
3 years agoceph-dencoder: Add erasure_code to denc-mod-osd's target_link_libraries
Tim Serong [Fri, 2 Sep 2022 08:44:09 +0000 (18:44 +1000)]
ceph-dencoder: Add erasure_code to denc-mod-osd's target_link_libraries

Fixes: https://tracker.ceph.com/issues/57390
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit 690b9c6e8097666b1cda8f5a4fdd3d1d6903373f)

3 years agotools/ceph-dencoder: include experimental/filesystem as an alternative
Kefu Chai [Fri, 2 Sep 2022 00:27:23 +0000 (08:27 +0800)]
tools/ceph-dencoder: include experimental/filesystem as an alternative

in case we use pre C++17 C++ compiler and standard library.

this change is not cherry-picked from main, as we are using new C++
stanrdard library which is compliant with C++20. so no need to worry
about this.

Signed-off-by: Tim Serong <tserong@suse.com>
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
3 years agoMerge pull request #47870 from zdover23/wip-doc-2022-08-30-backport-447843-to-pacific
zdover23 [Thu, 1 Sep 2022 20:14:44 +0000 (06:14 +1000)]
Merge pull request #47870 from zdover23/wip-doc-2022-08-30-backport-447843-to-pacific

pacific: doc/mgr: update prompts in dboard.rst includes

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agotools/ceph-dencoder: register dencoders in "lib" in dev env
Kefu Chai [Thu, 28 Jul 2022 15:11:08 +0000 (23:11 +0800)]
tools/ceph-dencoder: register dencoders in "lib" in dev env

if "CMakeCache.txt" is found in current directory, try to load
dencoder shared libraries  from ./lib. this heuristics is used by
`ceph.in` also for relaunching itself to get access to python
bindings.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 3dec0345e72f2491b12486f69d3b9d21cece493f)

3 years agotools/ceph-dencoder: register dencoders in plugin
Kefu Chai [Tue, 3 Aug 2021 12:44:01 +0000 (20:44 +0800)]
tools/ceph-dencoder: register dencoders in plugin

so we can allocate and deallocate dencoders in the shared library,
instead of allocating them in the shared library, while deallocating
them in the executable.

after this change

- the plugin holds the strong references of the dencoders
- the registry holds the plugins and weak references of dencoders
- the dencoder shared libraries calls the method exposed by plugin
  to alloc/dealloc the dencoders

this change should address the segfault when compiling with Clang.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit ae7e79db7b5bc38d8ecde6705932ff2671c9c326)

3 years agotools/ceph-dencoder: extract denc_plugin.h out
Kefu Chai [Tue, 3 Aug 2021 10:30:34 +0000 (18:30 +0800)]
tools/ceph-dencoder: extract denc_plugin.h out

to prepare for the upcoming change to hold the encoders in DencoderPlugin

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 957b1c247c25713297c5d72964f553a8014f81ef)

3 years agotools/ceph-dencoder: s/exit(1)/return 1/ in main()
Kefu Chai [Tue, 3 Aug 2021 09:10:17 +0000 (17:10 +0800)]
tools/ceph-dencoder: s/exit(1)/return 1/ in main()

for better readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a412e0645410be983eac765e603919970f90229a)

3 years agotools/ceph-dencoder: do not use singleton of registry
Kefu Chai [Tue, 3 Aug 2021 09:09:03 +0000 (17:09 +0800)]
tools/ceph-dencoder: do not use singleton of registry

instead of defining dencoder registry as a singleton, created it in
main().

it's simpler to reason about this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7c095590b8024197cae5af12b3897c68b425d54f)

3 years agotools: do not unload plugins during destruction.
Willem Jan Withagen [Sun, 11 Apr 2021 13:01:22 +0000 (15:01 +0200)]
tools: do not unload plugins during destruction.

FreeBSD ceph-dencoder crashes in the exit() calls, due to
invalid pointer references during the release process of
the loaded libraries.

Often this is signaled by libc reporting:
  __cxa_thread_call_dtors: dtr 0x47efc0 from unloaded dso, skipping

The cause for this is different behaviour between FreeBSD and Linux:
https://groups.google.com/g/bsdmailinglist/c/22ncTZAbDp4/m/Dii_pII5AwAJ
_The FreeBSD implementation here looks racy. If one thread dlcloses an
object while another thread is exiting, we can end up calling a
function at an invalid memory address. It also looks as if it may
be possible to unload one library, load another at the same address,
and end up executing entirely the wrong code, which would have some
serious security implications.

The GNU/Linux equivalent of this function locks the DSO in memory
until all references to it have gone away. A call to dlclose() on
GNU/Linux will not actually unload the library until all threads
with destructors in that library have been unloaded. I believe
that this reuses the same reference counting mechanism that
allows the same library to be dlopened and dlclosed multiple times.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
(cherry picked from commit 78d301098f6ead7fc341b68d7ac5e0a1cd3295c5)

3 years agorgw/rgw_dencoder: set identity_type when creating samples
Kefu Chai [Mon, 16 Aug 2021 08:01:42 +0000 (16:01 +0800)]
rgw/rgw_dencoder: set identity_type when creating samples

otherwise identity_type is a random number on stack. and there is good
chance that it does not match with the one decoded from the encoded
blob.

this change should address the failures like:

**** rgw_log_entry test 2 binary reencode check failed ****
   ceph-dencoder type rgw_log_entry select_test 2 encode export /tmp/typ-O8hVYK2Gb
   ceph-dencoder type rgw_log_entry select_test 2 encode decode encode export /tmp/typ-G09itHHIC
   cmp /tmp/typ-O8hVYK2Gb /tmp/typ-G09itHHIC

The following tests FAILED:
132 - check-generated.sh (Failed)
..

Fixes: https://tracker.ceph.com/issues/52278
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 22095f4bd831f0d736ba364ea9e46febe06576f9)

3 years agorgw/rgw_json_enc: dump obj using dump_stream()
Kefu Chai [Mon, 16 Aug 2021 08:21:42 +0000 (16:21 +0800)]
rgw/rgw_json_enc: dump obj using dump_stream()

use dump_stream() instead of dump_string() for dumping stringify object.

more readably this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cd30a7e5b4acda511de7218f39aa63d8cbf02060)

3 years agorgw/rgw_json_enc: dump rgw_log_entry::identity_type
Kefu Chai [Mon, 16 Aug 2021 08:23:26 +0000 (16:23 +0800)]
rgw/rgw_json_enc: dump rgw_log_entry::identity_type

should dump it for better debugging experience

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9aafa0248ef8529d39e478531db2d849f25b3c5c)

3 years agorpm: add missing % in %dir directive
Nathan Cutler [Mon, 5 Apr 2021 15:21:22 +0000 (17:21 +0200)]
rpm: add missing % in %dir directive

de6c8250a6d91403e6d334aeb901bf9720ba40eb added an explicit %dir directive for
a new directory added to the ceph-common package, but -- due to a typo --
neglected to include the "%". As a result, RPM builds started to fail with:

Processing files: ceph-common-17.0.0-2787.gde6c8250.el8.x86_64
error: File must begin with "/": {_libdir}/ceph/denc/

RPM build errors:
    File must begin with "/": {_libdir}/ceph/denc/

Fixes: de6c8250a6d91403e6d334aeb901bf9720ba40eb
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 404f8b2ce268917c9ce04fa06aaccff4816ad8d6)

3 years agorpm: make ceph-common own the new denc directory
Nathan Cutler [Sun, 4 Apr 2021 09:02:11 +0000 (11:02 +0200)]
rpm: make ceph-common own the new denc directory

2d3c6561b4ac1473a728e81c232d7dfe6fc0188c introduced a new library directory
"%{_libdir}/ceph/denc/" in ceph-common but did not explicitly state that it
should be owned by the package. This caused OBS builds to fail as follows:

[ 5515s] ceph-common-17.0.0-2786.1.x86_64.rpm: directories not owned by a package:
[ 5515s]  - /usr/lib64/ceph/denc

Fixes: 2d3c6561b4ac1473a728e81c232d7dfe6fc0188c
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit de6c8250a6d91403e6d334aeb901bf9720ba40eb)

3 years agotools/ceph-dencoder: build dencoders as plugins
Kefu Chai [Sat, 27 Mar 2021 16:56:39 +0000 (00:56 +0800)]
tools/ceph-dencoder: build dencoders as plugins

to reduce the memory footprint when linking ceph-dencoder.

* src/tools/ceph-dencoder:
  * build dencoders as shared libraries named with the prefix of
    "den-mod-". so ceph-dencoder can find them
  * install dencoders into $prefix/lib/ceph/denc, so ceph-dencoder
    can find them
  * only expose "register_dencoders()" function from plugins.
  * load plugins in specified directory
* ceph.spec.in: package plugins
* debian: package plugins

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2d3c6561b4ac1473a728e81c232d7dfe6fc0188c)

3 years agoMerge pull request #47155 from rhcs-dashboard/wip-56615-pacific
Pere Diaz Bou [Thu, 1 Sep 2022 09:17:25 +0000 (11:17 +0200)]
Merge pull request #47155 from rhcs-dashboard/wip-56615-pacific

pacific: mgr/dashboard: do not recommend throughput for ssd's only cluster

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agocmake: fail on unknown attribute
Kefu Chai [Fri, 6 Aug 2021 09:26:16 +0000 (17:26 +0800)]
cmake: fail on unknown attribute

on Clang, the option for detecting unknown attribute is
-Wunknown-attributes, so "-Wattributes -Werror" does not fail the test
when the C compiler is Clang.

in this change, we just turn all warnings into errors.
this should fail the test if the compiler does not understand
`__attribute__((__symver__ ...))`

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 08179fd9f399b024acbe135e4eb6655126927f30)

3 years agolibrados/librados_c: check for both symvers
Boris Ranto [Thu, 5 Aug 2021 07:08:08 +0000 (09:08 +0200)]
librados/librados_c: check for both symvers

We should check if either asm symver or attribute symver is defined and
not assume that attribute symver implies asm symver.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit ff1941a8d34f52ca25c31e9945f3591feb304b55)

3 years agocmake: Check -flto flags
Boris Ranto [Thu, 5 Aug 2021 06:36:21 +0000 (08:36 +0200)]
cmake: Check -flto flags

We should check if -flto-partition=none is defined when the compiler
does not support symver attribute and fail the build if it is not.

Fixes: https://tracker.ceph.com/issues/40060
Co-authored-by: Kefu Chai <tchaikov@gmail.com>
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 5bcfd5caeee90df18809a6f4c9a2e7e8f7734f8b)

3 years agolibrados/librados_c: Use symver attribute if available
Boris Ranto [Tue, 3 Aug 2021 18:44:47 +0000 (20:44 +0200)]
librados/librados_c: Use symver attribute if available

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit f90e26cb4bffbef8c0b00b8774887963232c8b0a)

3 years agolibrados/librados_c: check .symver support using cmake
Kefu Chai [Tue, 27 Apr 2021 03:15:32 +0000 (11:15 +0800)]
librados/librados_c: check .symver support using cmake

the __asm__(".asmver ..") is a support provided by the compiler, so
would be better to detect it by either checking the compiler identifer
or just try it out.

in this change, instead of checking the building platform, we check this
feature using check_c_source_compiles().

in future, we could support versioned symbols using function attriubte
or symbol tables or version-script.

on platform where symbol versioning is not supported, we might need to
go with a different approach.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d0858dbfb4b76a6e3d0b6001316e0f08703f3a26)

3 years agorpm: Re-enable LTO on supported systems
Boris Ranto [Tue, 3 Aug 2021 08:11:58 +0000 (10:11 +0200)]
rpm: Re-enable LTO on supported systems

We can now use LTO when building ceph. The symver issue was fixed by
using the gcc __symver__ attribute. The systems that support it can now
re-enable LTO.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 381507a31c4740bfc75dff8f13026df89e0ccdf8)

3 years agorados: Update symver defs
Boris Ranto [Mon, 2 Aug 2021 19:32:15 +0000 (21:32 +0200)]
rados: Update symver defs

The gcc compiler now supports symver attribute. We should update the
symvers to be able to support LTO.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit e76193399d1966adc91c3ccef9c0d7bdbad7a221)

3 years agorados: Fix function ordering
Boris Ranto [Tue, 3 Aug 2021 07:26:16 +0000 (09:26 +0200)]
rados: Fix function ordering

The build fails because the function definitions are out of order. This
also reuses the LIBRADOS_C_API_DEFAULT_F macro for function definitions.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit d79efb024cb6788a95885160bdd0d3a256f439f2)

3 years agocmake: disable LTO when building pmdk
Kefu Chai [Thu, 4 Aug 2022 05:09:11 +0000 (13:09 +0800)]
cmake: disable LTO when building pmdk

See-also: https://tracker.ceph.com/issues/54473
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 2a97033ba86ac678a2ce5f99c60090c79f5fd257)

Conflicts:
cmake/modules/Buildpmem.cmake: trivial resolution

3 years agocmake,debian: install pure python module to deb_system path
Kefu Chai [Thu, 4 Aug 2022 13:52:43 +0000 (21:52 +0800)]
cmake,debian: install pure python module to deb_system path

in ubuntu 22.04 and debian unstable, the layout (scheme) for system
python module is named "deb_system", the default one is 'posix_local'.
and 'posix_local' installs python modules into paths like
usr/local/lib/python3.10/dist-packages/. hence dh_install fails
when it tries to find the files to be packaged under directory of
usr/lib/python3*/site-packages/.

in this change, the "deb_system" scheme is used if it is available,
and fall back to "posix_prefix" to be backward compatible with older
debian (derivative) distros.

also, update the source directories of pure python's installation
from `site-packages` to `*-packages`, to be compatible with ubuntu focal
and ubuntu jammy. as we are now using the specified scheme instead of
the default one.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 04967404ed682835f81c1a5e51f94d09805d38b3)
Conflicts:
    apply the same change to debian/python3-cephfs.install, which
    was remove in main branch, but we need to preserve it in pacific.

3 years agodoc/mgr: update prompts in dboard.rst includes 47870/head
Zac Dover [Mon, 29 Aug 2022 00:39:51 +0000 (10:39 +1000)]
doc/mgr: update prompts in dboard.rst includes

This PR adds unselectable prompts to three files that are
transcluded in the doc/mgr/dashboard.rst file. These three
files are:

 1. debug.inc.rst
 2. feature_toggles.inc.rst
 3. motd.inc.rst

The addition of unselectable prompts to these three files
completes the work begun in PR#47810 (d8064b4), which sought
to bring dashboard.rst into line with the unselectable prompt
standard introduced by Kefu Chai in 2020.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit fc70ccde758cb1f7c03f208115b88a4ef325aed7)

3 years agoMerge pull request #47838 from zdover23/wip-doc-2022-08-28-backport-47736-to-pacific
zdover23 [Sun, 28 Aug 2022 21:38:47 +0000 (07:38 +1000)]
Merge pull request #47838 from zdover23/wip-doc-2022-08-28-backport-47736-to-pacific

pacific: doc: Update release process doc to accurately reflect current process

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc: Update release process doc to accurately reflect current process 47838/head
David Galloway [Mon, 22 Aug 2022 20:12:36 +0000 (16:12 -0400)]
doc: Update release process doc to accurately reflect current process

Signed-off-by: David Galloway <dgallowa@redhat.com>
(cherry picked from commit 4829af891ce9fbe41f4b48b10d342e774366dd52)

3 years agoMerge pull request #47525 from NitzanMordhai/wip-57076-pacific
Kefu Chai [Fri, 26 Aug 2022 16:43:50 +0000 (00:43 +0800)]
Merge pull request #47525 from NitzanMordhai/wip-57076-pacific

pacific: osd: remove invalid put on message

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
3 years agoMerge pull request #47807 from adk3798/pacific-rgw-bad-example
Adam King [Thu, 25 Aug 2022 16:30:40 +0000 (12:30 -0400)]
Merge pull request #47807 from adk3798/pacific-rgw-bad-example

pacific: doc/cephadm: fix example for specifying networks for rgw

Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
3 years agodoc/cephadm: fix example for specifying networks for rgw 47807/head
Adam King [Wed, 24 Aug 2022 14:36:53 +0000 (10:36 -0400)]
doc/cephadm: fix example for specifying networks for rgw

count_per_host must be used with underscores rather
than dashes to work, you need to pass service_id not
service_name and the option for the port is called
rgw_frontend_port not just "port"

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 6b6f56a5b623f68d59af8902eae5e1157f47e382)

3 years agoMerge pull request #47781 from zdover23/wip-doc-2022-08-24-backport-47751-to-pacific
zdover23 [Thu, 25 Aug 2022 12:47:40 +0000 (22:47 +1000)]
Merge pull request #47781 from zdover23/wip-doc-2022-08-24-backport-47751-to-pacific

pacific: doc/mgr: edit orchestrator.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #47791 from zdover23/wip-doc-2022-08-25-backport-47785-pacific-2
zdover23 [Thu, 25 Aug 2022 05:51:31 +0000 (15:51 +1000)]
Merge pull request #47791 from zdover23/wip-doc-2022-08-25-backport-47785-pacific-2

pacific: docs: fix doc link pointing to master in dashboard.rst

Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodebian: install from site-packages to dist-packages
Kefu Chai [Fri, 1 Apr 2022 00:22:11 +0000 (08:22 +0800)]
debian: install from site-packages to dist-packages

this change addresses the regression introduced by
637dd7b40404e644519b1fc3b5ef03f2d18def00

dist-packages is a debian specific directory for holding 3rd party
python modules. so install the pure python packages into it.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit e6eee052220e78b09fab04dab27ef7901ffbe8f3)

3 years agodocs: fix doc link pointing to master in dashboard.rst 47791/head
Nizamudeen A [Wed, 24 Aug 2022 10:41:00 +0000 (16:11 +0530)]
docs: fix doc link pointing to master in dashboard.rst

Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 79bbaa555307639cd10819c35c0d0c2f4cd7f0fd)

3 years agodoc/mgr: edit orchestrator.rst 47781/head
Zac Dover [Tue, 23 Aug 2022 06:59:04 +0000 (16:59 +1000)]
doc/mgr: edit orchestrator.rst

This PR improves the English language in the "Orchestrator CLI"
section of the MGR documentation. It adds a couple of section
headers in order to signpost the information in the document
a bit more than had already been done, but it makes no major
structural changes to the presentation of the information here.

This PR was motivated by feedback from the 2022 Ceph User Survey
in which one of the respondents wrote "better ceph orch documen-
tation".

The final section on this page, "Current Implementation Status",
must be verified by someone who is familiar with the current state
of "ceph orch" and a date stamp should be applied to the top of
the section so that the word "current" has a meaningful referent.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 2172b7ec98bacc183b0e3a22d95dc8ad80af5a8a)

3 years agodo_cmake.sh: build with python3.10 on ubuntu version >= 22.0
Laura Flores [Mon, 22 Aug 2022 20:46:53 +0000 (20:46 +0000)]
do_cmake.sh: build with python3.10 on ubuntu version >= 22.0

Fixes: https://tracker.ceph.com/issues/57230
Signed-off-by: Laura Flores <lflores@redhat.com>
(cherry picked from commit 20d609b4ab0b829e4bcf43d81ae2e10e36ded8e0)

3 years agoMerge pull request #47446 from kamoltat/wip-ksirivad-backport-pacific-47138
Kamoltat Sirivadhna [Tue, 23 Aug 2022 16:36:23 +0000 (12:36 -0400)]
Merge pull request #47446 from kamoltat/wip-ksirivad-backport-pacific-47138

pacific: qa/tasks/ceph_manager.py: increase test_pool_min_size timeout
Reviewed-by: Samuel Just <sjust@redhat.com>
3 years agoMerge pull request #47134 from Matan-B/wip-56579-pacific
Yuri Weinstein [Tue, 23 Aug 2022 15:09:23 +0000 (08:09 -0700)]
Merge pull request #47134 from Matan-B/wip-56579-pacific

pacific: osd/SnapMapper: fix legacy key conversion in snapmapper class

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
3 years agoMerge pull request #46642 from ifed01/wip-ifed-avl-update-cursor-pac
Yuri Weinstein [Tue, 23 Aug 2022 15:07:41 +0000 (08:07 -0700)]
Merge pull request #46642 from ifed01/wip-ifed-avl-update-cursor-pac

pacific: os/bluestore: Always update the cursor position in AVL near-fit search.

Reviewed-by: Mark Nelson <mnelson@redhat.com>
3 years agoMerge pull request #47180 from lxbsz/wip-55929
Yuri Weinstein [Tue, 23 Aug 2022 14:27:16 +0000 (07:27 -0700)]
Merge pull request #47180 from lxbsz/wip-55929

pacific: mds: fix crash when exporting unlinked dir

Reviewed-by: Kotresh HR <khiremat@redhat.com>
3 years agoMerge pull request #47059 from lxbsz/wip-56465
Yuri Weinstein [Tue, 23 Aug 2022 14:26:21 +0000 (07:26 -0700)]
Merge pull request #47059 from lxbsz/wip-56465

pacific: mds: switch to use projected inode instead

Reviewed-by: Kotresh HR <khiremat@redhat.com>
3 years agomgr: Define PY_SSIZE_T_CLEAN ahead of every Python.h
Pete Zaitcev [Wed, 15 Dec 2021 05:04:34 +0000 (23:04 -0600)]
mgr: Define PY_SSIZE_T_CLEAN ahead of every Python.h

Building on Fedora 35 with Python 3.10 makes vstart to loop
forever, throwing the following message:

 Error EINVAL: SystemError: PY_SSIZE_T_CLEAN macro must be
 defined for '#' formats

I followed the hint in the following document:
 https://docs.python.org/3/c-api/intro.html

It says "recommended" to always define PY_SSIZE_T_CLEAN,
but as you can see it is actually required in our case.

Fixes: https://tracker.ceph.com/issues/53441
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
(cherry picked from commit 389054888f2aa782f73564125ec7a1ef0212d536)

Conflicts:
src/mgr/CMakeLists.txt: trivial resolution

3 years agopybind/mgr/dashboard: do not use distutils.version.StrictVersion
Kefu Chai [Mon, 8 Aug 2022 14:41:17 +0000 (22:41 +0800)]
pybind/mgr/dashboard: do not use distutils.version.StrictVersion

replace `distutils.version.StrictVersion` with
`pkg_resources.parse_version()`

as the former is deprecated, see https://peps.python.org/pep-0632/.
let's use `pkg_resources` instead. this change also addresses
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010894.
we have this issue when testing with an ubuntu jammy test node.
see https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1967139

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 075b31c1c763286065f13be87c6ba987529b1206)

Conflicts:
debian/ceph-mgr-dashboard.requires: add the runtime requirement
        to debian/control instead.
src/mypy-constrains.txt: not backported (too new for pacific)
src/pybind/mgr/dashboard/requirements.txt: trivial resolution
src/pybind/mgr/tox.ini: not backported (too new for pacific)

3 years agovstart.sh: disable "rook" mgr module by default
Kefu Chai [Wed, 21 Apr 2021 13:50:21 +0000 (21:50 +0800)]
vstart.sh: disable "rook" mgr module by default

as we don't have "jsonpatch" installed for running "make check", "rook"
module always fails to load, and the error message when mgr is
unable to load is misleading and distracting. let's just disabled it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit bb75ef228a7fefbbf3a61f577bf424ff0db0b67f)

3 years agomgr/dashboard: bump up more-itertools
Kefu Chai [Fri, 12 Aug 2022 05:06:25 +0000 (13:06 +0800)]
mgr/dashboard: bump up more-itertools

before this change, more-itertools tries to import Sequence from
collections, this leads us to failures like:

```
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/__init__.py",
line 9, in <module>
    import cherrypy
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/__init__.py",
line 76, in <module>
    from . import _cprequest, _cpserver, _cptree, _cplogging, _cpconfig
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/_cprequest.py",
line 11, in <module>
    from cherrypy import _cpreqbody
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/_cpreqbody.py",
line 135, in <module>
    import cheroot.server
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cheroot/server.py",
line 96, in <module>
    from .workers import threadpool
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cheroot/workers/threadpool.py",
line 20, in <module>
    from jaraco.functools import pass_none
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/jaraco/functools.py",
line 8, in <module>
    import more_itertools
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/more_itertools/__init__.py",
line 1, in <module>
    from more_itertools.more import *  # noqa
  File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/more_itertools/more.py",
line 3, in <module>
    from collections import Counter, defaultdict, deque, Sequence
ImportError: cannot import name 'Sequence' from 'collections'
(/usr/lib/python3.10/collections/__init__.py)
ERROR: InvocationError for command
/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/bin/python3
-m dashboard.controllers.docs
/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/tmp/openapi.yaml
(exited with code 1)
```
after this change, more-itertools is pin'ed at the latest stable
at the time of writing, which includes the fixes including
https://github.com/more-itertools/more-itertools/commit/30a861bc5a4f53a9ba73923c9048a3632a0f9d18
.

please note, more-itertools dropped python3.3 support. but neither
do us support this python version, so we should be safe.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 26f5678d4f58bfa18c389cd05ecdc454deb3024f)

3 years agopybind/mgr/dashboard: do not install enum34
Kefu Chai [Sun, 31 Jan 2021 04:03:07 +0000 (12:03 +0800)]
pybind/mgr/dashboard: do not install enum34

enum was introduced by python 3.4, but we require python3.6 and up.
so drop it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9d0023ba906f3a5eb930318609db5ec61e57f030)

3 years agorun-make-check.sh: Don't enable WITH_SEASTAR
Tim Serong [Mon, 22 Aug 2022 04:10:53 +0000 (14:10 +1000)]
run-make-check.sh: Don't enable WITH_SEASTAR

It doesn't make sense to build with seastar on LTS branches as crimson
is still under active development.

Fixes: https://tracker.ceph.com/issues/57229
Signed-off-by: Tim Serong <tserong@suse.com>
3 years agoMerge pull request #47492 from petrutlucian94/wip-57053-pacific
Yuri Weinstein [Mon, 22 Aug 2022 20:53:40 +0000 (13:53 -0700)]
Merge pull request #47492 from petrutlucian94/wip-57053-pacific

pacific: common: use boost::shared_mutex on Windows

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
3 years agoMerge pull request #47451 from NitzanMordhai/wip-57029-pacific
Yuri Weinstein [Mon, 22 Aug 2022 20:52:12 +0000 (13:52 -0700)]
Merge pull request #47451 from NitzanMordhai/wip-57029-pacific

pacific: librados: rados_ioctx_destroy check for initialized ioctx

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agocmake/modules: avoid using distutils
Kefu Chai [Fri, 25 Mar 2022 15:06:46 +0000 (23:06 +0800)]
cmake/modules: avoid using distutils

to address following warning from python 3.9:

<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 637dd7b40404e644519b1fc3b5ef03f2d18def00)

3 years agocmake/modules: drop a cmake variable
Kefu Chai [Fri, 25 Mar 2022 15:02:06 +0000 (23:02 +0800)]
cmake/modules: drop a cmake variable

less redirections

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit f0fc04fbea3ec68d1cab321e016046e0b204def1)

3 years agocmake: use ceph repo with tag
Kefu Chai [Fri, 27 Aug 2021 16:14:55 +0000 (00:14 +0800)]
cmake: use ceph repo with tag

to address following warning:

fatal: reference is not a tree: 7f02f21f53ccd5e2448086f8e9015489693dd2dc
CMake Error at /home/jenkins-build/build/workspace/ceph-pull-requests/build/fio_ext-prefix/tmp/fio_ext-gitclone.cmake:40 (message):
  Failed to checkout tag: '7f02f21f53ccd5e2448086f8e9015489693dd2dc'

it seems that the shallow option does not work with a sha1 tag option,
let's continue using the ceph repo with a tag.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit d7771002ef9a455390aadbcc84287dd9b738c629)

3 years agocmake: use upstream repo for fio
Kefu Chai [Thu, 26 Aug 2021 15:57:00 +0000 (23:57 +0800)]
cmake: use upstream repo for fio

this change partially reverts 10baab3fc8293b8c30ca90a4acd76f70d011f1b5,
but since the fix for C++ build is not included by any tag or branche so
far. let's just use the sha1 for now.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit b65d0747b57ad9a32030ed49322f028c449a1d5f)

3 years agocmake/modules/BuildFIO: use ceph fork
Kefu Chai [Sat, 14 Aug 2021 01:47:36 +0000 (09:47 +0800)]
cmake/modules/BuildFIO: use ceph fork

to pick up the clang build fix. we should use the upstream repo, once the
clang build fix gets merged.

bumping up the fio helps to address following error, as this part was rewritten:

src/test/fio/CMakeFiles/fio_ceph_objectstore.dir/fio_ceph_objectstore.cc.o.d -o src/test/fio/CMakeFiles/fio_ceph_objectstore.dir/fio_ceph_objectstore.cc.o -c ../src/test/fio/fio_ceph_objectstore.cc
In file included from ../src/test/fio/fio_ceph_objectstore.cc:26:
In file included from src/fio/fio.h:18:
In file included from src/fio/thread_options.h:6:
In file included from src/fio/options.h:8:
src/fio/parse.h:128:13: error: arithmetic on a pointer to void
        return ret + offset;
               ~~~ ^
1 error generated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 10baab3fc8293b8c30ca90a4acd76f70d011f1b5)

3 years agocmake: pass compile options by fio interface library
Kefu Chai [Tue, 23 Mar 2021 07:16:04 +0000 (15:16 +0800)]
cmake: pass compile options by fio interface library

for better readability and maintainability

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit c190fee53d23212faf22b26df33346b393e11b8d)

3 years agoMerge pull request #46901 from dparmar18/wip-56112-pacific
Yuri Weinstein [Tue, 16 Aug 2022 14:32:13 +0000 (07:32 -0700)]
Merge pull request #46901 from dparmar18/wip-56112-pacific

pacific: qa/cephfs: fallback to older way of get_op_read_count

Reviewed-by: Kotresh HR <khiremat@redhat.com>
3 years agoMerge pull request #47321 from adk3798/wip-56504-pacific
zdover23 [Mon, 15 Aug 2022 15:31:49 +0000 (01:31 +1000)]
Merge pull request #47321 from adk3798/wip-56504-pacific

pacific: doc/cephadm/services: the config section of service specs

Reviewed-by: Zac Dover <zac.dover@gmail.com>
3 years agoMerge pull request #47369 from kotreshhr/wip-56978-pacific
Yuri Weinstein [Mon, 15 Aug 2022 15:21:51 +0000 (08:21 -0700)]
Merge pull request #47369 from kotreshhr/wip-56978-pacific

pacific: mgr/volumes: Fix subvolume creation in FIPS enabled system.

Reviewed-by: Ramana Raja <rraja@redhat.com>
3 years agoMerge pull request #47587 from zdover23/wip-doc-2022-08-15-backport-47580-to-pacific
zdover23 [Mon, 15 Aug 2022 15:18:44 +0000 (01:18 +1000)]
Merge pull request #47587 from zdover23/wip-doc-2022-08-15-backport-47580-to-pacific

pacific: doc/rados/operations: add prompts to operating.rst

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/rados/operations: add prompts to operating.rst 47587/head
Zac Dover [Sat, 13 Aug 2022 23:14:56 +0000 (09:14 +1000)]
doc/rados/operations: add prompts to operating.rst

This commit adds ".. prompt:: bash $"-style prompts to operating.rst.
This brings this file up to the standard established in 2020 when
Kefu added support for the ".. prompt::" directive.

This commit is a part of an initiative to modernize the presentation
of all BASH commands in the RADOS documentation.

The progress of this project can be tracked here:
https://tracker.ceph.com/issues/57108

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 69d62c05ef0ac8b903944d9e8c8fe4fbb3f73275)

3 years agoMerge pull request #47578 from idryomov/wip-alloc-size-doc-fixup-pacific
Ilya Dryomov [Sun, 14 Aug 2022 06:52:58 +0000 (08:52 +0200)]
Merge pull request #47578 from idryomov/wip-alloc-size-doc-fixup-pacific

pacific: doc/man/rbd: Mention changed `bluestore_min_alloc_size`

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agodoc/man/rbd: Mention changed `bluestore_min_alloc_size` 47578/head
Niklas Hambüchen [Sun, 2 Jan 2022 22:27:55 +0000 (23:27 +0100)]
doc/man/rbd: Mention changed `bluestore_min_alloc_size`

This change was done in: https://github.com/ceph/ceph/pull/34588

Signed-off-by: Niklas Hambüchen <mail@nh2.me>
(cherry picked from commit 254025343b1c49e1d0aa72fdea0cbe0483704245)

3 years agoMerge pull request #47307 from yaarith/wip-56486-pacific
Laura Flores [Thu, 11 Aug 2022 23:57:25 +0000 (18:57 -0500)]
Merge pull request #47307 from yaarith/wip-56486-pacific

pacific: mgr/telemetry: reset health warning after re-opting-in

3 years agoMerge pull request #47337 from ifed01/wip-ifed-fix-mempool-cache-other-pac
Igor Fedotov [Thu, 11 Aug 2022 11:22:46 +0000 (14:22 +0300)]
Merge pull request #47337 from ifed01/wip-ifed-fix-mempool-cache-other-pac

pacific: os/bluestore: fix AU accounting in bluestore_cache_other mempool

Reviewed-by: akuczyk@redhat.com
3 years agoMerge pull request #47357 from rhcs-dashboard/wip-56966-pacific
Pere Diaz Bou [Wed, 10 Aug 2022 08:40:51 +0000 (10:40 +0200)]
Merge pull request #47357 from rhcs-dashboard/wip-56966-pacific

pacific: mgr/dashboard: add required validation for frontend and monitor port

3 years agoMerge pull request #47454 from rhcs-dashboard/wip-57038-pacific
Pere Diaz Bou [Wed, 10 Aug 2022 08:26:34 +0000 (10:26 +0200)]
Merge pull request #47454 from rhcs-dashboard/wip-57038-pacific

pacific: mgr/dashboard: host list tables doesn't show all services deployed

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agoosd: remove invalid put on message 47525/head
NitzanMordhai [Sun, 24 Jul 2022 08:00:07 +0000 (08:00 +0000)]
osd: remove invalid put on message
message converted to use smart pointer, the put is extra step that
causing the double put and valgrind error
the regression was introduced by d4a71c3

Fixes: https://tracker.ceph.com/issues/52124
Signed-off-by: Nitzan Mordechai <nmordec@redhat.com>
(cherry picked from commit c449638812daeafa89c592b9c396eaa66327f85f)

3 years agoMerge pull request #47497 from tchaikov/pacific-pr-47486
Kefu Chai [Wed, 10 Aug 2022 05:51:10 +0000 (13:51 +0800)]
Merge pull request #47497 from tchaikov/pacific-pr-47486

pacific: mgr/dashboard: bump up teuthology

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
3 years agoMerge pull request #47211 from kamoltat/wip-ksirivad-backport-pacific-fix-56151
Yuri Weinstein [Tue, 9 Aug 2022 16:52:13 +0000 (09:52 -0700)]
Merge pull request #47211 from kamoltat/wip-ksirivad-backport-pacific-fix-56151

pacific:src/mgr/DaemonServer.cc: fix typo in output gap >= max_pg_num_change

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #46748 from myoungwon/pacific-53855
Yuri Weinstein [Tue, 9 Aug 2022 16:50:56 +0000 (09:50 -0700)]
Merge pull request #46748 from myoungwon/pacific-53855

pacific: test: fix TierFlushDuringFlush to wait until dedup_tier is set on bas…

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #47111 from kotreshhr/wip-56527-pacific
Yuri Weinstein [Tue, 9 Aug 2022 16:13:05 +0000 (09:13 -0700)]
Merge pull request #47111 from kotreshhr/wip-56527-pacific

pacific: mds: Don't blocklist clients in any replay state

Reviewed-by: Xiubo Li <xiubli@redhat.com>
3 years agoMerge pull request #46797 from mchangir/pacific-mgr-snap_schedule-persist-all-changes...
Yuri Weinstein [Tue, 9 Aug 2022 16:11:50 +0000 (09:11 -0700)]
Merge pull request #46797 from mchangir/pacific-mgr-snap_schedule-persist-all-changes-to-rados

pacific: mgr/snap_schedule: persist all updates to RADOS

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #47372 from adk3798/wip-56743-pacific
Adam King [Mon, 8 Aug 2022 20:00:53 +0000 (16:00 -0400)]
Merge pull request #47372 from adk3798/wip-56743-pacific

pacific: mgr/cephadm: Add disk rescan feature to the orchestrator

Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agoMerge pull request #47484 from tchaikov/pacific-pr-47478
Kefu Chai [Mon, 8 Aug 2022 13:21:34 +0000 (21:21 +0800)]
Merge pull request #47484 from tchaikov/pacific-pr-47478

pacific: cmake: remove spaces in macro used for compiling cython code

Reviewed-by: Tim Serong <tserong@suse.com>
3 years agomgr/dashboard: bump up teuthology 47497/head
Kefu Chai [Sat, 6 Aug 2022 00:24:12 +0000 (08:24 +0800)]
mgr/dashboard: bump up teuthology

to include the fix of e7c5d67e10fe29da22180f9e09b8973ae166c8fc,
see https://github.com/ceph/teuthology/pull/1746.
to address the test failure on ubuntu jammy. where we have python3.10

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 0aa1fa68d354badd3363a4ea6cacbce373c3316e)

3 years agoMerge pull request #47413 from guits/pacific-cv-backports
Guillaume Abrioux [Mon, 8 Aug 2022 12:55:40 +0000 (14:55 +0200)]
Merge pull request #47413 from guits/pacific-cv-backports

ceph-volume: Pacific backports

3 years agocommon: use boost::shared_mutex on Windows 47492/head
Lucian Petrut [Mon, 4 Jul 2022 13:59:46 +0000 (13:59 +0000)]
common: use boost::shared_mutex on Windows

The winpthreads shared mutex implementation causes deadlocks on
Windows [1][2]. Specifically, async RBD IO calls are hanging. This
also prevents the images from being unmounted.

For this reason, we're switching to boost::shared_mutex when using
MinGW.

[1] https://github.com/cloudbase/wnbd/issues/63#issuecomment-1161547102
[2] https://github.com/msys2/MINGW-packages/issues/3319
Trace: https://pastebin.com/raw/i3jpTyS3

Fixes: https://tracker.ceph.com/issues/56480
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 35b67b2558fd4b7c39ca10e5b13b4dc6c983ce3c)

3 years agocmake: remove spaces in macro used for compiling cython code 47484/head
Kefu Chai [Fri, 5 Aug 2022 08:40:41 +0000 (16:40 +0800)]
cmake: remove spaces in macro used for compiling cython code

we are facing following FTBFS on jammy + GCC-11.2 + Cython 0.29 +
CMake 3.22:

creating /home/jenkins-build/build/workspace/ceph-api/build/lib/cython_modules/temp.linux-x86_64-3.10/home/jenkins-build/build/workspace/ceph-api/build/src/pybind/cephfs
compile options: '-I/usr/include/python3.10 -I/usr/include/python3.10 -c'
extra options: '-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -iquote/home/jenkins-build/build/workspace/ceph-api/src/include -w -Dvoid0=dead_function(void) -D__Pyx_check_single_interpreter(ARG)=ARG ## 0 -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2'
cc: /home/jenkins-build/build/workspace/ceph-api/build/src/pybind/cephfs/cephfs.c
cc: warning: ##: linker input file unused because linking not done
cc: error: ##: linker input file not found: No such file or directory
cc: warning: 0: linker input file unused because linking not done
cc: error: 0: linker input file not found: No such file or directory

it seems cython is not able to escape the space in the "extra options"
anymore, so the "##" and "0" are considered as object files passed to
compiler in addition to cephfs.c.

in this change the spaces are removed to help cython to make the right
decision.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 5824fed5b427f1d055fb7104fea2e68cd36e6844)

Conflicts:
cmake/modules/Distutils.cmake: trivial resolution

3 years agoMerge pull request #47266 from cfsnyder/wip-56646-pacific
Yuri Weinstein [Fri, 5 Aug 2022 21:53:24 +0000 (14:53 -0700)]
Merge pull request #47266 from cfsnyder/wip-56646-pacific

pacific: rgw: maintain object instance within RGWRadosObject::get_obj_state method

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
3 years agoceph-volume: filter out non-existing devices 47413/head
Guillaume Abrioux [Mon, 25 Jul 2022 15:19:01 +0000 (17:19 +0200)]
ceph-volume: filter out non-existing devices

[1] has broken teuthology tests.

```
[root@smithi097 /]# ls -l /sys/block/
total 0
lrwxrwxrwx 1 root root 0 Jul 25 14:15 dm-0 -> ../devices/virtual/block/dm-0
lrwxrwxrwx 1 root root 0 Jul 25 14:15 dm-1 -> ../devices/virtual/block/dm-1
lrwxrwxrwx 1 root root 0 Jul 25 14:15 dm-2 -> ../devices/virtual/block/dm-2
lrwxrwxrwx 1 root root 0 Jul 25 14:15 dm-3 -> ../devices/virtual/block/dm-3
lrwxrwxrwx 1 root root 0 Jul 25 14:15 dm-4 -> ../devices/virtual/block/dm-4
lrwxrwxrwx 1 root root 0 Jul 25 14:13 loop0 -> ../devices/virtual/block/loop0
lrwxrwxrwx 1 root root 0 Jul 25 14:13 loop1 -> ../devices/virtual/block/loop1
lrwxrwxrwx 1 root root 0 Jul 25 14:13 loop2 -> ../devices/virtual/block/loop2
lrwxrwxrwx 1 root root 0 Jul 25 14:13 loop3 -> ../devices/virtual/block/loop3
lrwxrwxrwx 1 root root 0 Jul 25 14:13 loop4 -> ../devices/virtual/block/loop4
lrwxrwxrwx 1 root root 0 Jul 25 14:13 loop5 -> ../devices/virtual/block/loop5
lrwxrwxrwx 1 root root 0 Jul 25 14:13 loop6 -> ../devices/virtual/block/loop6
lrwxrwxrwx 1 root root 0 Jul 25 14:13 loop7 -> ../devices/virtual/block/loop7
lrwxrwxrwx 1 root root 0 Jul 25 14:12 nvme0n1 -> ../devices/pci0000:00/0000:00:02.0/0000:02:00.0/nvme/nvme0/nvme0n1
lrwxrwxrwx 1 root root 0 Jul 25 14:18 nvme1c1n1 -> ../devices/virtual/nvme-fabrics/ctl/nvme1/nvme1c1n1
lrwxrwxrwx 1 root root 0 Jul 25 14:18 nvme1n1 -> ../devices/virtual/nvme-subsystem/nvme-subsys1/nvme1n1
lrwxrwxrwx 1 root root 0 Jul 25 14:18 nvme2c2n1 -> ../devices/virtual/nvme-fabrics/ctl/nvme2/nvme2c2n1
lrwxrwxrwx 1 root root 0 Jul 25 14:18 nvme2n1 -> ../devices/virtual/nvme-subsystem/nvme-subsys2/nvme2n1
lrwxrwxrwx 1 root root 0 Jul 25 14:18 nvme3c3n1 -> ../devices/virtual/nvme-fabrics/ctl/nvme3/nvme3c3n1
lrwxrwxrwx 1 root root 0 Jul 25 14:18 nvme3n1 -> ../devices/virtual/nvme-subsystem/nvme-subsys3/nvme3n1
lrwxrwxrwx 1 root root 0 Jul 25 14:18 nvme4c4n1 -> ../devices/virtual/nvme-fabrics/ctl/nvme4/nvme4c4n1
lrwxrwxrwx 1 root root 0 Jul 25 14:18 nvme4n1 -> ../devices/virtual/nvme-subsystem/nvme-subsys4/nvme4n1
lrwxrwxrwx 1 root root 0 Jul 25 14:12 sda -> ../devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0/block/sda
[root@smithi097 /]#
```

devices like `nvme1c1n1` exist in `/sys/block` but aren't present in `/dev`

```
[root@smithi097 /]# ls -l /dev/nvme*
crw------- 1 root root  10, 122 Jul 25 14:16 /dev/nvme-fabrics
crw------- 1 root root 240,   0 Jul 25 14:12 /dev/nvme0
brw-rw---- 1 root disk 259,   0 Jul 25 14:15 /dev/nvme0n1
crw------- 1 root root 240,   1 Jul 25 14:16 /dev/nvme1
brw-rw---- 1 root disk 259,   2 Jul 25 15:24 /dev/nvme1n1
crw------- 1 root root 240,   2 Jul 25 14:16 /dev/nvme2
brw-rw---- 1 root disk 259,   4 Jul 25 15:24 /dev/nvme2n1
crw------- 1 root root 240,   3 Jul 25 14:16 /dev/nvme3
brw-rw---- 1 root disk 259,   6 Jul 25 15:24 /dev/nvme3n1
crw------- 1 root root 240,   4 Jul 25 14:16 /dev/nvme4
brw-rw---- 1 root disk 259,   8 Jul 25 15:24 /dev/nvme4n1
[root@smithi097 /]#
```

If a device isn't actually present in `/dev`, `get_block_devs_sysfs()` shouldn't return it.

[1] https://github.com/ceph/ceph/commit/c7f017b21ade3762ba5b7b9688bed72c6b6

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 0ee8351e4d564724aa68a2b8d03bc53e281e7fc9)

3 years agoceph-volume/tests: fix test_exception_returns_default
Guillaume Abrioux [Wed, 3 Aug 2022 09:16:36 +0000 (11:16 +0200)]
ceph-volume/tests: fix test_exception_returns_default

There are cases, like running tests as root user, where this test fails
because root user can always read the file content.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 47aec3b86bcc850292f66d24670c5d8dc0a33c85)

3 years agoceph-volume: drop `ceph-bluestore-tool` call in Device._parse()
Guillaume Abrioux [Mon, 18 Jul 2022 14:54:17 +0000 (14:54 +0000)]
ceph-volume: drop `ceph-bluestore-tool` call in Device._parse()

disk.has_bluestore_label() does the same thing without a subprocess call.

Fixes: https://tracker.ceph.com/issues/56622
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f5f3117510c287d817534c9f7c25af5f208c2f56)

3 years agoceph-volume: fix is_ceph_disk_member()
Guillaume Abrioux [Tue, 26 Jul 2022 14:24:31 +0000 (16:24 +0200)]
ceph-volume: fix is_ceph_disk_member()

`dev['NAME']` can't match `part` given that it's the name of the
parent device being compared to the partition name.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 24899a1f8d77bc3c10ef158bb463349d615f7c57)
(cherry picked from commit 66d0a07b34faa4514b1b7cb2d46ed90d83b91963)

3 years agoceph-volume/tests: migrate to pyfakefs
Guillaume Abrioux [Wed, 27 Jul 2022 11:41:41 +0000 (13:41 +0200)]
ceph-volume/tests: migrate to pyfakefs

ceph-volume unit tests shouldn't actually create contents on the
filesystem from where it runs (even though they are written in a tmp
dir), let's use pyfakefs.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 1274ba34b4d21c5abf2cd2da035d6d25ae8d03da)

3 years agoceph-volume/tests: fix test_path_is_valid()
Guillaume Abrioux [Wed, 27 Jul 2022 12:28:10 +0000 (14:28 +0200)]
ceph-volume/tests: fix test_path_is_valid()

When ceph-volume tests are run from a host where there's no `/dev/sda`
device, this test fails.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7ab9d99420db2995542dfab7c416021dcc1c4a47)

3 years agoceph-volume: report slave devices in inventory
Guillaume Abrioux [Tue, 19 Jul 2022 12:06:10 +0000 (12:06 +0000)]
ceph-volume: report slave devices in inventory

`ceph-volume inventory` currently reports the following:

```

Device Path               Size        rotates available Model name
/dev/mapper/mpatha        50.00 GB    True    True
/dev/mapper/mpathaa       6.00 GB     True    True
/dev/mapper/mpathab       6.00 GB     True    True
/dev/mapper/mpathac       6.00 GB     True    True
/dev/mapper/mpathad       6.00 GB     True    True
/dev/mapper/mpathae       6.00 GB     True    True
```

whereas something like following would be useful:

```

Device Path               Size         Device nodes    rotates available Model name
/dev/mapper/mpatha        50.00 GB     sdf,sde         True    True
/dev/mapper/mpathaa       6.00 GB      sdbe,sdat       True    True
/dev/mapper/mpathab       6.00 GB      sdav,sdbf       True    True
/dev/mapper/mpathac       6.00 GB      sdbb,sdbl       True    True
/dev/mapper/mpathad       6.00 GB      sdas,sdbc       True    True
/dev/mapper/mpathae       6.00 GB      sdax,sdbh       True    True
```

Fixes: https://tracker.ceph.com/issues/56624
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 1ac2a8270cf4aece58ae3f952cc4d1ef978384ed)

3 years agoceph-volume: support symlinks as devices
Jan Sobczak [Fri, 20 Nov 2020 13:33:13 +0000 (14:33 +0100)]
ceph-volume: support symlinks as devices

This makes ceph-volume support passing symlinks as devices.

Fixes: https://tracker.ceph.com/issues/49103
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 9ddc5b77372cd2e0d5badd433c93d147cb25c6ee)

3 years agoceph-volume: improve mpath devices reporting
Guillaume Abrioux [Tue, 19 Jul 2022 11:13:31 +0000 (11:13 +0000)]
ceph-volume: improve mpath devices reporting

An environment with mpath devices looks like following:

`lsblk` output:

```
sdy        65:128  0    6G  0 disk
`-mpathm  252:8    0    6G  0 mpath
sdz        65:144  0    6G  0 disk
`-mpathm  252:8    0    6G  0 mpath
```

`multipath -ll` output:

```
mpathm (3600140575bbe2d3c0c6493fb6e6ed84c) dm-8 LIO-ORG,TCMU device
size=6.0G features='0' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 2:0:0:30 sdz  65:144 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
  `- 3:0:0:30 sdy  65:128 active ready running
```

`ceph-volume inventory` output:
```
Device Path               Size         rotates available Model name
/dev/mapper/mpathm        6.00 GB      True    True
/dev/sdy                  6.00 GB      True    False     TCMU device
/dev/sdz                  6.00 GB      True    False     TCMU device
```

ceph-volume shouldn't report devices `/dev/sdy` and `/dev/sdz`, they will never be
available in such a scenario. Considering this, in a host with a bunch of mpath devices
it will pollute the inventory output.

Fixes: https://tracker.ceph.com/issues/56621
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e892f02a1a9126cbb520c90aeef0afb3590ddbbb)

3 years agoceph-volume: fix simple scan
Guillaume Abrioux [Fri, 29 Jul 2022 13:58:05 +0000 (15:58 +0200)]
ceph-volume: fix simple scan

When the class `Device` is instantiated with a path instead of a
block device, it fails like following.

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/ceph_volume/util/device.py", line 130, in __init__
    self._parse()
  File "/usr/lib/python3.6/site-packages/ceph_volume/util/device.py", line 233, in _parse
    self.ceph_device = disk.has_bluestore_label(self.path)
  File "/usr/lib/python3.6/site-packages/ceph_volume/util/disk.py", line 906, in has_bluestore_label
    with open(device_path, "rb") as fd:
IsADirectoryError: [Errno 21] Is a directory: '/var/lib/ceph/osd/ceph-0/'
```

passing a path instead of a block device is valid, `simple scan` needs it.

Fixes: https://tracker.ceph.com/issues/56969
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 5a10e3e9e865aafd9d3f90beb186777060d17f08)

3 years agoceph-volume: Remove refs to get_block_devs_lsblk
Zack Cerza [Tue, 21 Jun 2022 17:37:49 +0000 (11:37 -0600)]
ceph-volume: Remove refs to get_block_devs_lsblk

It's been replaced by get_block_devs_sysfs

Signed-off-by: Zack Cerza <zack@redhat.com>
(cherry picked from commit 2023e71f695c1962534c6012d5b331bebd10ec31)

3 years agoceph-volume: Rename env var; add warning
Zack Cerza [Tue, 21 Jun 2022 17:28:30 +0000 (11:28 -0600)]
ceph-volume: Rename env var; add warning

So that we can have a nice big warning that fires once per invocation, I
think using a callable class with a class attribute seems like a decent
approach. A closure could work too.

Signed-off-by: Zack Cerza <zack@redhat.com>
(cherry picked from commit 69f58f51a2d7967d597a8d61c0ab20b52e8dc374)