Commit Graph

585 Commits

Author SHA1 Message Date
Zuhair AlSader
7efceddac8
rgw: add DAOS SAL implementation
To build with DAOS backend, use -DWITH_RADOSGW_DAOS=YES cmake
option. `daos-devel` rpm should be installed beforehand.

To connect to DAOS pool, add the following configuration
parameters to ceph.conf:
```
    [client]
            ...
            rgw backend store = daos
            daos pool = tank
```

A pool could be created using the following command:
```
    dmg pool create --size=<size> <pool_name>
```

To install `daos-devel` do:
```
    sudo wget -O /etc/yum.repos.d/daos-packages.repo https://packages.daos.io/v2.0/EL8/packages/x86_64/daos_packages.repo
    sudo rpm --import https://packages.daos.io/RPM-GPG-KEY
    sudo yum install -y epel-release daos-server daos-client daos-devel
```

Co-authored-by: Walter Warniaha <walter.warniaha@seagate.com>

Signed-off-by: Zuhair AlSader <zuhair.alsader@seagate.com>
2022-09-07 12:19:41 -04:00
Arthur Outhenin-Chalandre
d46e14c71b
ceph-mixin: fix PATH issues with jsonnet-bundler
In 4a3afcf, the $PATH is set for the test, but we cannot set multiple
properties with a single `set_property()` cmake command. We fix that by
adding the installation path of jsonnet-bundler
(CMAKE_CURRENT_BINARY_DIR) to the $PATH used for every tox test.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Co-Authored-By: Kefu Chai <tchaikov@gmail.com>
2022-08-18 13:43:34 +02:00
Kefu Chai
f5e9e1a4f5 cmake: find motr libraries and header before using them
cmake should fail when generating the building system, if the necessary
development libraries or the header files are missing.

in this change, Findmotr.cmake is added to detect the motr library
and header so that we can use it to find the motr package before using
it.

See-also: https://tracker.ceph.com/issues/57079
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-10 21:15:12 +08:00
Kefu Chai
5824fed5b4 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>
2022-08-05 20:07:02 +08:00
Kefu Chai
2a97033ba8 cmake: disable LTO when building pmdk
See-also: https://tracker.ceph.com/issues/54473
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-04 17:56:48 +08:00
Kefu Chai
606ec517f7
Merge pull request #46554 from adamemerson/wip-up-the-boost
build: Bump Boost version to 1.79

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2022-07-26 07:39:10 +08:00
Adam C. Emerson
947ac23979 build: Bump Boost version to 1.79
Also remove bind_allocator, as Boost.Asio now provides this function.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2022-07-22 11:04:43 -04:00
Yin Congmin
eb94cda7bc cmake: add ndctl and daxctl to build pmdk
In order to enable the pmem character device, add ndctl=y to the parameter
of compiling the pmdk library when WITH_BLUESTORE_PMEM is ON. Because
after find_ndctl and find_daxctl are added, the dependency packages
required by WITH_BLUESTORE_PMEM and WITH_RBD_RWL become more different.
So separated these two. libpmem has no version required. libpmemobj
required version >=1.8.

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
2022-07-12 10:33:04 +08:00
Yin Congmin
b6b24852a6 cmake: add findndctl and finddaxctl function
In order to support the character device of pmem usage in bluestore via
libpmem built by Ceph itself, we need to enable daxctl and ndctl
dependency. add the installation of ndctl and find it. the version of
ndctl and daxctl library requires >63. "apt-get install" meet the version
under ubuntu focal.

the installation of ndctl-devel in ceph.spec.in has not been verified.

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
2022-07-12 10:32:57 +08:00
Kefu Chai
9bfa00d626
Merge pull request #46835 from CongMinYin/wip-install-pmdk
install-deps: install pmdk libraries

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2022-06-28 21:15:53 +08:00
Yin Congmin
a84a2e1091 cmake: rename a series of pmem libraries to pmdk
At first, libpmem was the only library. Later, pmem related libraries
such as libpmemobj and libpmem2 were gradually added. These libraries
were also integrated into one named pmdk. So rename to pmdk.

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
2022-06-28 01:16:33 +08:00
Deepika Upadhyay
3eb6c29aa5 cmake: remove git fetch and use submodule for building opentelemetry lib
We were using git fetch and an unofficial remote to fetch
opentelemetry-cpp, as it needed additional patch to include boost
headers, with the merge of

open-telemetry/opentelemetry-cpp#1100
open-telemetry/opentelemetry-cpp#1020

we do not require to maintain our own patched version. Also, we were
using git fetch as a temporary change, now that tracing is always on, it
should be right time to adapt to using opentelemetry-cpp as a submodule.

This removes compile time fetch for opentelemetry-cpp instead use
official opentelemetry-cpp lib as a submodule.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2022-06-22 01:06:33 +00:00
Ilya Dryomov
03d27945a6 cmake: pass -Wno-error when building PMDK
It's hitting pacific with a nuisance -Werror=array-parameter= const
char * vs const char[37] mismatch.  Follow commit 91a616b26e ("cmake:
pass RTE_DEVEL_BUILD=n when building dpdk") and just disable -Werror.

Fixes: https://tracker.ceph.com/issues/55977
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-06-09 14:37:10 +02:00
Yuval Lifshitz
042f3c7978
Merge pull request #44684 from zenomri/wip-omri-tracing-compiled
tracer: set tracing compiled in by default
2022-06-02 20:22:17 +03:00
Kefu Chai
b539372437
Merge pull request #44264 from tchaikov/wip-mipel
cmake: do not use GCC extension when detecting 16-byte atomic op

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2022-05-21 20:27:06 +08:00
Omri Zeneva
f956b79aaa cmake: change build type of opentelemtry to Release
Signed-off-by: Omri Zeneva <ozeneva@redhat.com>
2022-05-17 04:42:01 -04:00
Deepika Upadhyay
19eff9a014 cmake: use BOOST_ROOT if building with system boost
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2022-05-17 04:38:01 -04:00
Deepika Upadhyay
bbaafcd32c cmake: create jaeger_base target for consuming tracing libraries
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2022-05-17 04:38:01 -04:00
Deepika Upadhyay
e63f1ba027 cmake: include opentelemetry include directories
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2022-05-17 04:38:01 -04:00
Kefu Chai
a2cc0386a4
Merge pull request #46103 from tchaikov/cmake-alloc-cleanup
cmake: re-enable TCMalloc and allocator related cleanups

Reviewed-by: Samuel Just <sjust@redhat.com>
2022-05-04 19:28:48 +08:00
Ilya Dryomov
dbe7f75e66
Merge pull request #45845 from SUSE/wip-fix-55237
ceph.spec.in: openSUSE: require gcc11-c++, disable parquet

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2022-05-04 11:54:21 +02:00
Kefu Chai
5e3d92243a cmake/modules/BuildFIO: specify the full path to alloc libraries
before this change, we assume that "ALLOCATOR" is the library name
which can be found by linker with "ld -l <namespec>". but ideally,
cmake can find a library in a more sophiscated way used by
its "find_library()" implementation. so, in this change, instead of
relying on the default paths looked up by "ld", use the path
found by cmake.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-05-02 12:40:55 +08:00
Tim Serong
8ab5d7eea0 ceph.spec.in: openSUSE: require gcc11-c++, disable parquet
This commit also explicilty sets the toolset when calling
boost's bootstrap.sh, because the latter is only capable
of autodetecting gcc if you have an unversioned `g++` in
the path, which may not be the case if only gcc11-c++ is
installed (the unversioned gcc-c++ package includes the
/usr/bin/g++ symlink, but depending on which version of
openSUSE we build on, that might point to a different gcc
version, so we don't want to use that).

Fixes: https://tracker.ceph.com/issues/55237
Signed-off-by: Tim Serong <tserong@suse.com>
2022-04-29 15:13:20 +10:00
Kefu Chai
ea4ae6d2f1 cmake/modules: use exact version of python3 when finding cython
* CMakeLists.txt:
    always pass "EXACT" to find_package(Python3).
    because per cmake document, "EXACT" only takes effect when
    <Package>_FIND_VERSION_COUNT is greater than 1, where <Package>
    is "Python3". see also cmake/modules/FindPython/Support.cmake
* cmake/modules/AddCephTest.cmake:
    drop redundant find_package(Python3) calls. since Python3 is
    a mandatory requirement for building Ceph, we only need a
    single call of find_package(Python3..) in the top of the source
    tree. the only possible case to repeat it is to ensure that we
    have the correct version of Python3 used in following CMake
    script. but there is no need to repeat it if we just want to
    ensure that we have a python3 interpretor in place.
* cmake/modules/Distutils.cmake:
    always pass "EXACT" to find_package(Python3).
    we should always pass EXACT to find_package() when finding python3,
    this is a follow-up of e2babdfae8

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-04-21 06:52:18 +08:00
Kefu Chai
8b7ee35c3a
Merge pull request #44230 from optimistyzy/122_add_dml
blk/pmem: use DML library to offload read/write operations in pmem

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2022-04-20 18:47:00 +08:00
Ziye Yang
86cb8c75c3 Add the support to use DML library for PMEM device.
The purpose of this patch is to add the initial support to
offload memory/pmem operations by sync usage through hardware path
in DML library.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2022-04-19 14:51:12 +08:00
Kefu Chai
e2babdfae8 cmake/modules: always use the python3 specified in command line
if another python3 with higher version is found by
find_package(Python3), the cmake's install script would just
install the python modules/extensions into that python3's
dist-package directory, and the packaging script would fail
to find these artifacts when trying to package them.

so we need to ensure that the install directories for python
modeules/extensions are always "versioned" with WITH_PYTHON3
cmake option.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-04-16 09:15:03 +08:00
Kefu Chai
637dd7b404 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>
2022-03-25 23:49:12 +08:00
Kefu Chai
f0fc04fbea cmake/modules: drop a cmake variable
less redirections

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-03-25 23:49:12 +08:00
Casey
5da406a4ee cmake: move Arrow targets into find_package modules
Signed-off-by: Casey <cbodley@redhat.com>
2022-03-14 10:19:02 -04:00
Casey
433782dbd5 cmake: use arrow's find_package modules
Signed-off-by: Casey <cbodley@redhat.com>
2022-03-14 10:19:02 -04:00
Casey Bodley
b10364dc21 cmake: add submodule for utf8proc at v2.2.0
adds utf8proc submodule, needed by the arrow submodule in centos. add a
WITH_SYSTEM_UTF8PROC option that controls whether or not utf8proc is
built from submodule

non-system utf8proc is built as a static library to avoid conflicts with
system-provided libraries

ceph.spec.in sets WITH_SYSTEM_UTF8PROC=OFF until it's available in
centos

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-03-14 10:19:02 -04:00
Casey Bodley
2ca6d75521 cmake: add submodule for Apache Arrow at v6.0.1
adds an arrow submodule. when WITH_RADOSGW_SELECT_PARQUET is enabled,
the submodule is built as an external project and rgw links against its
imported Arrow::Parquet target

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-03-14 10:19:02 -04:00
Kefu Chai
4c726846e4 cmake: do not use GCC extension when detecting 16-bit atomic op
we have following error when trying to compile the C++ source
file on mipsel:

/usr/bin/c++ -DHAVE_CXX11_ATOMIC  -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -g1 -Wdate-time -D_FORTIFY_SOURCE=2  -std=c++11 -fPIE -o CMakeFiles/cmTC_9f34f.dir/src.cxx.o -c /<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx
/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:44: error: template argument 1 is invalid
   15 | bool atomic16(std::atomic<unsigned __int128> *ptr)
      |                                            ^
/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:44: error: template argument 1 is invalid
/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:44: error: template argument 1 is invalid
/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:44: error: template argument 1 is invalid
/<<PKGBUILDDIR>>/obj-mipsel-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:15:47: error: ‘ptr’ was not declared in this scope
   15 | bool atomic16(std::atomic<unsigned __int128> *ptr)
      |                                               ^~~

the compiler was GCC 11.2.0.

in this change, instead of detecting the architecture, check for
the macro of `__SIZEOF_INT128__`, which is respected by GCC and Clang.
so it's more readable. also, instead of using the `unsigned __int128`
type provided as a GCC extension, use a struct to mimic the use case
of boost::lockfree library.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-03-10 22:54:51 +08:00
Kefu Chai
91a616b26e cmake: pass RTE_DEVEL_BUILD=n when building dpdk
ceph is still using the Makefile based building system for building
DPDK. and DPDK enables -Werror if RTE_DEVEL_BUILD is 'y' which is
enabled by default when the dpdk is built from a git repo.

but newer GCC is more picky than the older versions, to prevent
the possible FTBFS when we switch to newer GCC for building old
branches whose dpdk submodule might be include the changes addressing
those warnings. let's just disable this option.

the only effect of this option is to add -Werror to CFLAGS. but
the building warnings from DPDK is not our focus when developing
Ceph in the most cases. so it should be fine.

see also
eac901ce29/doc/build-sdk-quick.txt (L18)

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-03-05 12:57:24 +08:00
Kefu Chai
f356cc8869 cmake: use string(JOIN ..) to compose URL for boost download
* since the minimum required cmake version is now 3.16, there is no
  need to check for cmake version for using multiple URLs for
  downloading external project.
* use string(JOIN ..) to compose URL option for downloading boost

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-03-02 23:49:52 +08:00
Miaomiao Liu
9a9001a08f compressor: fix compilation issues about QATzip
Signed-off-by: Miaomiao Liu <miaomiao.liu@intel.com>
Signed-off-by: Hualong Feng <hualong.feng@intel.com>
2022-02-18 17:45:30 +08:00
Miaomiao Liu
082dcf0a58 cmake: replace BuildQatDrv.cmake with FindQatDrv.cmake
because QAT driver with version v1.7.l.4.14.0 or higher cannot be dowmloaded
directly by URL, FindQatDrv.cmake can find the locally installed QAT package and libraries

Signed-off-by: Miaomiao Liu <miaomiao.liu@intel.com>
Signed-off-by: Hualong Feng <hualong.feng@intel.com>
2022-02-08 14:06:07 +08:00
Tongliang Deng
e82b0a7b09 cmake/modules/BuildSPDK.cmake: link whole-archive
We build spdk as static library, linking against them requires the
use of `-Wl,--whole-archive` as argument, otherwise we will have error
`nvme.c: nvme_probe_internal: *ERROR*: NVMe trtype 256 not available`.
This is due to the use of constructor functions in spdk to register
NVMe transports. So we need to do so to ensure we call all the
constructors.

Signed-off-by: Tongliang Deng <dengtongliang@sensetime.com>
2022-01-20 19:39:27 +08:00
Clément Péron
96a8b4d846 cmake: dpdk: only append common dir if it has been found
Signed-off-by: Clément Péron <peron.clem@gmail.com>
2022-01-13 14:40:17 +01:00
Clément Péron
c37f15f54d cmake: dpdk: use STREQUAL and not EQUAL when comparing strings
Signed-off-by: Clément Péron <peron.clem@gmail.com>
2022-01-13 14:32:34 +01:00
Clément Péron
a24a4a0563 cmake: dpdk: fix typo in HINTS when looking for DPDK
Signed-off-by: Clément Péron <peron.clem@gmail.com>
2022-01-13 14:32:30 +01:00
Kefu Chai
76c35c6dd9 cmake: detect linux/blk/zoned support
* add find_package() support for detecting the existence of
  linux/blkzoned.h before using it.
* link against Linux::ZNS for adding the compilation definition of
  HAVE_ZNS instead of including it in the global config.h
* move the CMake option closer to where it is used for
  better readability. as this option takes effect only if
  crimson is compiled.
* make WITH_ZNS an option which depends on the value of
  CMAKE_SYSTEM_NAME. it is hidden and off if CMAKE_SYSTEM_NAME
  is not "Linux".

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2021-12-25 16:13:47 +08:00
Josh Durgin
facf0d35b1
Merge pull request #43598 from ideepika/wip-opentelemetry
migrate from using opentracing-cpp to opentelemetry-cpp static as distributed tracing API

Reviewed-by: Yuval Lifshitz <ylifshit@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-12-22 07:25:13 -08:00
Yuri Weinstein
ebb64e4a3d
Merge pull request #43612 from adamemerson/wip-unleveling
build: Remove LevelDB support

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-12-10 15:33:05 -08:00
Deepika Upadhyay
e78a4e2cea cmake: cleanup BuildJaeger as external project
replaced by Opentelemetry project, remove building and linking of jaeger
libraries.

* remove externalProject building
* linking of jaegertracing dependencies to ceph project

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-11-24 19:59:18 +05:30
Deepika Upadhyay
4128106de3 debian: remove libjaeger packaging
we no longer need to package libjaeger, as we would be using
libopentelemetry static libraries(until we support shared).

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-11-24 19:59:18 +05:30
Deepika Upadhyay
2749ab0635 cmake: replace opentracing-cpp with opentelemetry-cpp
we build and use targets needed for jaeger to work with opentelemetry
referring:
https://github.com/open-telemetry/opentelemetry-cpp/blob/main/examples/jaeger/CMakeLists.txt

right now we need a patch for using thrift from distro packages, hence
we are using GIT_FETCH based externalProject method, for development
purpose, which will be replace by more reliable method in future.

NOTE: phase 1, still needs to be tested.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-11-24 19:59:18 +05:30
Kefu Chai
709a77f220 cmake: test for 16-byte atomic support on mips also
it's reported that a mips64el build host is able to pass the test of
CheckCxxAtomic without linking against libatomic, while librbd.so
fails to link due to failures like

/usr/bin/ld: ../../../lib/librbd.so.1.16.0: undefined reference to `__atomic_store_16'
/usr/bin/ld: ../../../lib/librbd.so.1.16.0: undefined reference to `__atomic_load_16'
/usr/bin/ld: ../../../lib/librbd.so.1.16.0: undefined reference to `__atomic_compare_exchange_16'

so we have to check the existence of __atomic_load_16 instruction on
mips architecture.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2021-11-24 00:44:04 +08:00
Kefu Chai
66b1e8cecd cmake: check for python(\d)\.(\d+) when building boost
now that python3.10 has two digits as its minor version, we should be
able to match it.

this change fixes the build with python3.10. without this change, we'd
have

error: wrong library name 'python310' in the --with-<library> option.

when building with python3.10

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2021-11-19 00:27:34 +08:00