Commit Graph

551 Commits

Author SHA1 Message Date
Patrick Donnelly
eb52c869d5
cmake: improve build inst for cephsqlite
Notably, find SQLite and build the test code.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-19 08:52:54 -07:00
Milind Changire
1bc229381a
libcephsqlite: sqlite interface to RADOS
This library provides a SQLite front-end to the RADOS objects.
This effort will help alleviate the restriction on number of key-value pairs
that can be stored in an object.
This interface is a generic one without any constraint on the database
schema either. Library clients can enforce any schema and use SQLite API
to store data in the database backed by RADOS Objects.

Signed-off-by: Milind Changire <mchangir@redhat.com>
2021-03-19 08:52:54 -07:00
Kefu Chai
403f1ec288 cmake: make "WITH_CEPH_DEBUG_MUTEX" depend on CMAKE_BUILD_TYPE
this option is available only if CMAKE_BUILD_TYPE is Debug.

this change helps us to unify the checks for WITH_CEPH_DEBUG_MUTEX,
without this change, we always have to check both WITH_CEPH_DEBUG_MUTEX
*and* CMAKE_BUILD_TYPE.

after this change, we only respect WITH_CEPH_DEBUG_MUTEX.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-12 21:00:19 +08:00
Lucian Petrut
af6b37364b cephfs: Add ceph-dokan, providing Windows support
In order to expose ceph filesystems to Windows hosts, we propose
including ceph-dokan[1][2] in the Ceph tree, while updating it to
work with the latest CephFS and Dokany APIs.

Dokany is a well maintained project (fork of the original Dokan
project), allowing filesystems to be implemented in userspace,
even providing a Fuse compatibility layer.

One reason for not using the FUSE compatibility layer is that it's
only covering the high level API while Ceph is using the low level
FUSE API, which among other things is inode centric.

Changes made by this patch compared to the upstream ceph-dokan:

* support latest stable Dokany API. The upstream version relies on
  the legacy unmaintained Dokan API
* return proper error codes, converting standard errno.h values to
  NTSTATUS
* minor changes to support latest cephfs API
* drop duplicated ceph code, no longer needed if we're to include it
  in tree. This makes it much easier to maintain.
* drop redundant permission checks, leaving it up to libcephfs
* use ceph argparse helpers
* use ceph logging and daemon initialization
* fixed unicode handling
* switched to ceph coding style
* made ceph.conf param optional, using the default path if available
* enabled setting file timestamps
* append support
* configurable timeouts set once per mount
* ensure that the error code is always logged
* various cleanups (removed unused entry points, checks that have
  been moved to dokany, simplified conditional statements,
  unnecessary conversions in the hot path, etc).

[1] https://github.com/ketor/ceph-dokan
[2] https://github.com/ceph/ceph-dokan

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2021-03-05 13:13:31 +00:00
Jason Dillaman
bc0b9f52ad librbd: permit disabling QCOW migration format support
Downstream Red Hat products do not support the older QCOW format. This
will allow the support for the legacy QCOW format to be disabled for the
new RBD import-only migration support.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-02-23 07:19:43 -05:00
Kefu Chai
92d2ec7430 cmake: s/CCACHE_FOUND/CCACHE_EXECUTABLE/
to be more consistent with other find_program() calls.
and more correct this way, as ${CCACHE_FOUND} is not a boolean, it
is a path pointing to the found cache executable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-10 13:14:27 +08:00
Casey Bodley
3c3a6519cc cmake: partial revert of BOOST_USE_VALGRIND when ALLOCATOR=libc
the WITH_SYSTEM_BOOST binaries are not built with BOOST_USE_VALGRIND, so
it probably isn't safe to define for the headers only

this flag is needed for teuthology testing, and the shaman builds use
WITH_SYSTEM_BOOST=OFF. so the better fix is to enable WITH_BOOST_VALGRIND
so BuildBoost.cmake will build the libraries with valgrind support and add
-DBOOST_USE_VALGRIND to the necessary targets

this change was merged in https://github.com/ceph/ceph-build/pull/1736

Fixes: https://tracker.ceph.com/issues/48963

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2021-02-03 09:46:42 -05:00
Sage Weil
713f79fdf4 Merge PR #39039 into master
* refs/pull/39039/head:
	src/test/cli/monmaptool: adjust for new monmap features
	qa/tasks/cephadm: allow custom git_url for cephadm_branch pull
	qa/suites/rados/upgrade: include pacific-x
	qa/suites/upgrade/pacific-x/parallel
	qa/suites: some clean up for quincy
	mon: updates for quincy
	mon: update for quincy ondisk features
	script: add pacific
	doc/dev/release-checklist: we tagged v17.0.0
	ceph-volume: change to quincy
	include/ceph_features: retire MON_SINGLE_PAXOS
	include/ceph_features: define FEATURE_SERVER_QUINCY
	mon/MgrMonitor: add always_on_modules for quincy
	add feature/release name quincy
	kickoff v17 quincy
	doc/dev/release-checklists: uncheck everything!

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2021-01-29 14:01:26 -06:00
Sage Weil
d730a522e3 kickoff v17 quincy
Signed-off-by: Sage Weil <sage@newdream.net>
2021-01-28 13:29:27 -06:00
Yuval Lifshitz
76d4030cfe rgw: fix valgrind errors when protected_fixedsize_stack is used
Fixes: https://tracker.ceph.com/issues/48963

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2021-01-28 08:32:00 +02:00
Lucian Petrut
5c008725db cmake,win32*.sh: Windows DLL support
At the moment, the Windows binaries can only be linked statically.
This is less than ideal since:

* the resulting binaries can be quite large, especially when
including debug symbols
* librados and librbd cannot be used directly by 3rd party apps
* the build duration is increased

In order to do a dynamic build, we'll:

* add an option to win32_build.sh
* fix link order
* dynamically link boost
* disable the "-pie" flag when using Mingw, which generates incorrect
  executable entry points
* by default, cmake generates import libs for executables. The issue
  is that for rados.exe, it generates librados.dll.a, thus overriding
  the librados.dll import library, which breaks the build process.
  We'll configure cmake to skip generating import libs for executables.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2021-01-26 08:41:51 +00:00
Lucian Petrut
67a35a582c test: Update cmake files, allowing tests to run on Windows
We're porting to Windows some of the unit tests, mostly related to
rados and rbd.

This change filters out the tests that aren't supported on Windows.
At the same time, we're defining some missing dependencies since
unlike ELFs SOs, all DLL symbols have to be resolved at compile time.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2021-01-05 14:56:11 +02:00
Jan Fajerski
2fa311a462 Merge PR #32776 into master
* refs/pull/32776/head:
	win32*.sh: fetch WNBD dependency
	win32*.sh: bump win32 boost dependency
	cmake: skip osd, Lua and neorados on Windows
	win32*.sh: improve lib handling
	win32*.sh: update openssl location
	win32*.sh: cleanup dependency build dir when targetting Windows
	win32*.sh: Strip binaries individually
	win32*.sh: Cleanup zip archive creation
	cmake,win32*.sh: Add OS=(ubuntu|suse) flag, for distro settings
	win32*.sh: Use nproc for CPU count when targeting win32
	test: Include compat.h to find uid_t/gid_t/gidlist when cross compiling
	win32*.sh: improve win32 dependency check
	win32*.sh: isolate network operations when building win32 dependencies
	cmake: drop Python dependency when targeting Windows
	win32*.sh: cleanup Windows build script
	win32*.sh: fix patch command
	win32*.sh: update Windows build scripts and readme

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2021-01-05 12:50:37 +01:00
Yuval Lifshitz
c1af849a0d
Merge pull request #37924 from yuvalif/allow_packages_in_lua
rgw/lua: support packages via luarocks
2020-12-17 19:53:00 +02:00
Josh Durgin
8a74a937dd
Merge pull request #31358 from ideepika/wip-jaegertracing-in-ceph
jaegertracing build/ops integration

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2020-12-15 16:29:26 -08:00
Deepika Upadhyay
85ca7b36a0 jaeger: make tracing default turned off, until teuthology integration
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-12-11 10:08:09 +00:00
Deepika Upadhyay
4b69d3a184 jaeger, build/op: add jaeger and it's dependencies as submodules
* This commit introduces Jaegertracing library as package libjaeger,
  pickwhich would be consumed by other ceph pacakges such as ceph-common0

* adds the following dependencies, which would be build from source
  using ExternalProjectHelper.cmake +IncludeJaeger.cmake +
  Build<package>.cmake scripts:

  jaegertracing: v0.6.0 [added as a submodule]
  opentracing: v1.6.0 [added as a submodule]
  thrift: 0.13.0 [added as a submodule]
  yaml-cpp: 0.6.0
  json(optional)

* updates Boost to be installed instead of being build only, because
  jaegertracing them during their build process.

* ceph.spec.in: introduces a default enabled jaeger packaging option,
  which could be disabled using --without-jaeger flag during rpmbuild

* note: libjaeger package if enabled will be a dependency on ceph-common, ceph-mon, rgw_common and transitively will be a dependency for modules that have them as  a dependency.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-12-11 07:55:46 +00:00
Lucian Petrut
a149c0bebd cmake: drop Python dependency when targeting Windows
The Python bindings aren't supported on Windows for the time being,
for which reason we're dropping the Python dependency.

When cross-compiling, Cmake sometimes complains about not finding
the Python files instead of just using the host files.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2020-12-09 18:01:02 +00:00
Yuval Lifshitz
6ef3e52a3f rgw/lua: support packages via luarocks
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2020-12-04 09:55:56 +02:00
Kefu Chai
48b3ef5c70 cmake: pass REQUIRED to find_package(StdFilesystem)
otherwise there is chance that we could link to
StdFilesystem::filesystem which is not defined anywhere.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-02 19:42:34 +08:00
Kefu Chai
6c4dbb2e48
Merge pull request #38263 from tchaikov/wip-boost-1.74-asio
src,cmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT for Boost.Asio users and cleanups

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2020-11-26 18:18:22 +08:00
Kefu Chai
3d70821909 cmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT for Boost.Asio users
see also
https://www.boost.org/doc/libs/1_74_0/doc/html/boost_asio/std_executors.html#boost_asio.std_executors.polymorphic_i_o_executor

we could use `asio::any_io_executor` later on though for better
performance.

also, define CMP0093, so FindBoost reports Boost_VERSION in x.y.z
format. it is simpler to use `VERSION_GREATER_EQUAL` to compare its
version with 1.74 instead of its C macro version ("107000").

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-24 15:50:19 +08:00
Or Ozeri
ea3c1bfb9e librbd: add LUKS support
This commit introduces internal (not yet part of the api) librbd functions for:
1. formating an RBD image in LUKS format
2. parsing an RBD image in LUKS format

 The actual implementation of the LUKS format is done via libcryptsetup, which is added as a new dependency.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
2020-11-23 10:32:14 -05:00
Kefu Chai
8eeb7da944 cmake: enable CMP0074
to search prefixes specified by the <PackageName>_ROOT CMake
variable and the <PackageName>_ROOT environment variable. find_package()
in CMake 3.12 started to use these prefixes if it is enabled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-16 15:36:08 +08:00
Kefu Chai
c976f142f0 cmake: expose FIO_INCLUDE_DIR via libfio
always use the fio built from source for better consistency.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-09 16:01:59 +08:00
Kefu Chai
d16f7fb524 cmake: drop WITH_SYSTEM_FIO option
there is no well-known distro packaging fio.h, so drop this option.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-09 16:01:59 +08:00
Kefu Chai
17ed4b4b32 cmake: zbd is REQUIRED if demanded
it was broken in b1e133468f36fe7680d4967220ca42478ddf8c7f

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-02 21:08:10 +08:00
Kefu Chai
c754297672 cmake: enable LIBURING bluestore backend by default
so users interested in io_uring can test it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-02 21:08:10 +08:00
Kefu Chai
d162c00c66
Merge pull request #37788 from tchaikov/wip-zbd
rpm,cmake: s/WITH_LIBZBD/WITH_ZBD/ and enable ZBD on demand

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-By: Neha Ojha <nojha@redhat.com>
2020-10-30 11:17:56 +08:00
Kefu Chai
b1e133468f cmake: set HAVE_LIBZBD before creating "acconfig.h"
`acconfig.h` is generated using

configure_file(
  ${CMAKE_SOURCE_DIR}/src/include/config-h.in.cmake
  ${CMAKE_BINARY_DIR}/include/acconfig.h
)

in `config-h.in.cmake`, the cmake variable of `HAVE_LIBZBD` is checked.
so we need to ensure that this variable is visible from this
`configure_file()` statement.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-10-29 11:19:40 +08:00
Mahati Chamarthy
01400fedc3 librbd/cache: init functionality for SSD Cache
Adds build option and implements init functionality for SSD cache

Signed-off-by: Lisa Li <xiaoyan.li@intel.com>
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
2020-10-28 11:16:41 +05:30
Adam C. Emerson
b132d68930 {rgw, cmake}: Remove WITH_BOOST_CONTEXT
As Boost.Context now supports s390, there is no longer any need for
the conditional compilation.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-10-23 11:21:53 -04:00
Adam C. Emerson
713efb66e8 cmake: Bump boost version to 1.72
This gives us s390 support for Boost.Context.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-10-22 21:39:50 -04:00
Lucian Petrut
5fb90bb796 common: Convert remote errors on win32
errno.h values aren't the same across platforms, for which reason
we'll have to convert remote errors.

We'll use the cmake "add_definitions" function instead of
"add_compile_options", which generates incorrect compiler params
while "add_compile_definitions" isn't available at all when
using CMake 3.10, which is by default available on Ubuntu 18.04.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2020-09-21 12:34:15 +00:00
Kefu Chai
23e3358e3d
Merge pull request #36955 from agayev/zbc-to-zbd
os/bluestore: Switch from libzbc library to libzbd library

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-09-08 21:24:11 +08:00
Kefu Chai
d536386306 cmake: add "WITH_ZBD" option
for enabling Zoned Block Device support using libzbd

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-06 12:35:05 -04:00
Abutalib Aghayev
bb488b06c9 os/bluestore: Switch from libzbc library to libzbd library
Libzbc maintainers recommend switching to libzbd, which is lighter and supports
both ZNS SSDs and HM-SMR HDDs.

Signed-off-by: Abutalib Aghayev <agayev@cs.cmu.edu>
2020-09-06 12:35:05 -04:00
Kefu Chai
fc6f35a840 cmake: expose Sanitizers_COMPILE_OPTIONS as a list
* cmake/modules/FindSanitizers.cmake: do not pollute CMAKE_REQUIRED_FLAGS
* cmake/modules/FindSanitizers.cmake: expose Sanitizers_COMPILE_OPTIONS
  as a list
* CMakeLists.txt: append Sanitizers_COMPILE_OPTIONS to
  *_LINKER_FLAGS after replacing ";" with " " in it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-31 16:11:33 +08:00
Kefu Chai
bf045f5400
Merge pull request #36696 from tchaikov/wip-cmake-boost-zlib
cmake: link against ZLIB if statically linked against Boost

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-08-22 12:49:15 +08:00
Kefu Chai
a95576a143
Merge pull request #36530 from tchaikov/wip-cmake-python2
cmake: drop WITH_PYTHON2 option

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
2020-08-18 23:18:05 +08:00
Kefu Chai
58b04c5f21 cmake: link against ZLIB if statically linked agasint Boost
Boost::iostreams links against zlib. and FindBoost.cmake
does not add this linkage to Boost::iostreams target, let's
do this after `find_package(Boost...)`. in theory, it'd be
better to have this change in FindBoost.cmake, but it's
error-prone, and increases the risk of regression when
we sync our own copy of FindBoost.cmake with CMake upstream.

../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0xf7): undefined reference to `crc32'
../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0x165): undefined reference to
`deflateReset'../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0x185): undefined reference to `inflateEnd'
../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0x1a1): undefined reference to
`inflateReset'../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0x1b3): undefined reference to `deflateEnd'
../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0x38d): undefined reference to `inflateInit2_'
../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0x3d5): undefined reference to `deflateInit2_'
../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0x134): undefined reference to `deflate'
../../build.deps/mingw/boost/lib/libboost_iostreams.a(zlib.o):zlib.cpp:(.text+0x144): undefined reference to `inflate'
collect2: error: ld returned 1 exit status
src/CMakeFiles/ceph-common.dir/build.make:441: recipe for target 'bin/libceph-common.dll' failed

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-18 14:03:53 +08:00
Dan Mick
e7e950aa36 cmake: don't include tags for Python imports, .tox, build/ dirs
For things like cephadm, where there is a lot of "from X import Y",
the import tags become cumbersome.  .tox dirs and
python-common/build are just repeats of source files found elsewhere
so result in duplicate tags

Signed-off-by: Dan Mick <dmick@redhat.com>
2020-08-10 22:53:03 +00:00
Kefu Chai
583482829b cmake: drop WITH_PYTHON2 option
WITH_PYTHON2 option was deprecated in
5fc657b40d, that commit was included by
Ceph v15.1.0 and up, assuming all downstream packagings have removed
WITH_PYTHON2 option, we are now removing it completely.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-08 16:55:32 +08:00
Kefu Chai
22d042442a cmake: use add_compile_options for passing compile options
add_definitions() is for, well, adding definitions.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-01 13:33:25 +08:00
Kefu Chai
62cde26417 kv: always enable rocksdb
RocksDB is included as a submodule of Ceph, there is no need to check
for its existence anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-01 13:29:53 +08:00
Kefu Chai
8a7c8015c8 cmake: do not check OFED_PREFIX anymore
OFED_PREFIX was added to compile with xio messenger for supporting RDMA
using the Accelio and/or MLNX_OFED package. but xio messenger was removed in
in cc9a9142fd

let remove the leftover in CMakeLists

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-01 13:23:18 +08:00
Kefu Chai
289d43f400
Merge pull request #35416 from yanghonggang/master
os/bluestore: add blkin traces to BlueStore

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
2020-06-24 11:09:49 +08:00
Yang Honggang
da4105b5df os/bluestore: add blkin traces to BlueStore
Signed-off-by: Yang Honggang <yanghonggang@kuaishou.com>
2020-06-20 10:05:37 +08:00
Kefu Chai
3a0f015d28
Merge pull request #35631 from tchaikov/wip-cmake-cleanup
cmake: use add_compile_options() and add_definitions()

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2020-06-18 23:06:06 +08:00
Kefu Chai
91bccedc32 cmake: use add_compile_options()
instead of appending compile flags to CMAKE_C_FLAGS, use
add_compile_options(), as COMPILE_OPTIONS is a list, it'd simpler to
append options to it and to access it in a structured way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-18 16:40:14 +08:00
Kefu Chai
e6a773bc7a cmake: move include(GNUInstallDirs) up
so systemd/CMakeLists.txt can have access to the variables defined by
it. quote from https://cmake.org/cmake/help/latest/command/include.html.

> Variable reads and writes access the scope of the caller (dynamic
> scoping).

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-18 06:33:15 +08:00
Lucian Petrut
889247d557 include/compat: Add win32 compatibility layer
Windows provides socket and other related structures that are mostly
following the Posix standards, but using different headers.

Rather than adding lots of platform checks and require future commits
to do so as well, we're adding headers with the same names, which
in turn include the required Windows headers.

In a few cases, some functions declared by unistd.h are actually
defined by different Windows headers, so we'll need additional includes.

One thing to note here is that boost requires us to include aio.hpp
before the Windows socket headers.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2020-06-04 15:52:16 +00:00
Abutalib Aghayev
ab865ca002 os/bluestore: Enable writing data to HM-SMR hard drives.
Signed-off-by: Abutalib Aghayev <agayev@cs.cmu.edu>
2020-05-22 12:37:24 -04:00
Kefu Chai
47ce69aa57 cmake: remove cppcheck and iwyu targets
these targets are not used by any other targets, and are not integrated with CI.
so let's drop them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-05-13 20:34:27 +08:00
Kefu Chai
067adbf9a0 mgr: do not load disabled modules
an option named "mgr_disabled_modules" is added in this change to
prevent mgr from loading modules listed in this option. because mgr
loads *all* modules found in the configured path, and per
https://tracker.ceph.com/issues/45147, python subinterpreter could hang
when loading numpy, so this behavior practically creates a deadlock
in mgr.

this issue is found when mgr uses python3.8 runtime. in development
environment, it'd be inconvenient to disable the offending mgr module
without changing the source code, even if we can choose to not install
them, for instance, the enduser can workaround this issue by
uninstalling `ceph-mgr-diskprediction-local`.

an option would be useful in this case, so we can add the module to the
list before mgr tries to load it.

as this issue is found with python3.8 + diskprediction_local (numpy), so
this mgr module is disabled by default if mgr is compiled with python3.8
runtime.

Fixes: https://tracker.ceph.com/issues/45147
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-30 19:11:22 +08:00
Kefu Chai
b557467df0
Merge pull request #34535 from changchengx/refine_build_liburing
cmake: refactor liburing support

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-04-18 11:39:32 +08:00
Changcheng Liu
36918d7f78 cmake: use cmake module to integrate liburing
1. WITH_LIBURING is used to set HAVE_LIBURING to decide
   use liburing in KernelDevice or not.
2. WITH_SYSTEM_LIBURING is to choose use system installed
   liburing or build the liburing from source code.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
2020-04-17 23:22:56 +08:00
Kefu Chai
2b3adb5c5e cmake: rename Findfuse.cmake to FindFUSE.cmake
so its name is consistent with upstream name, and with the variables
exposed by FindFUSE.cmake.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-17 14:10:55 +08:00
Sage Weil
6d09963ec5 CMakeLists: 16.0.0
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:09:41 -05:00
Jianpeng Ma
9d76123fdf cmake: remove duplicated code.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2020-04-08 11:08:02 +08:00
Sage Weil
895b856aee Merge remote-tracking branch 'gh/octopus' 2020-03-23 20:09:41 -05:00
Jenkins Build Slave User
dc6a0b5c3c 15.2.0 2020-03-23 17:47:45 +00:00
Adam C. Emerson
7f573bb334 build: Add WITH_BOOST_VALGRIND option
To build Boost.Context (and other libraries) with support to allow
them to be valground usefully, and to include the define to link
against them.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-03-20 00:51:49 -04:00
Jenkins Build Slave User
4536217610 15.1.1 2020-03-13 17:05:38 +00:00
Kefu Chai
f6389baff6 cmake: reduce the indent level
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-24 12:45:35 +08:00
Kefu Chai
a4e9566d23 cmake: use loop for applying new policies
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-24 12:32:54 +08:00
Lucian Petrut
d15481f1a5 cmake: [win32] Update cmake files
We'll update the cmake files in order to be able to build ceph
components for Windows targets.

Cross compiling using MINGW is the easiest approach for now.
Subsequently, we'll add support for Clang and MSVC.

This patch provides the following changes:
* include winsock2.h, which provides ntohl on Windows
* avoid unsupported compiler flags when using msvc
* add a custom toolchain file for mingw
* update install command for ceph-common in order to work with mingw
* avoid running test sample when cross compiling
* link against the ws_32 lib
* set argeted Windows version
* skip yasm checks when targeting Windows
* allow multiple redefinitions when using mingw, picking the first one.
  this is a workaround for a mingw TLS bug:
  https://sourceforge.net/p/mingw-w64/bugs/816/

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2020-02-19 08:24:21 +00:00
Sebastian Wagner
615381659c cmake: Integrate Rook client generation
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-02-13 11:33:55 +01:00
Jenkins Build Slave User
49b0421165 15.1.0 2020-01-29 22:10:24 +00:00
Sage Weil
ef6ed98766 ceph_release: octopus rc 15.1.0
Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-13 14:44:05 -06:00
Kefu Chai
5fc657b40d cmake: drop WITH_PYTHON2 option
* drop WITH_PYTHON2 option
* print warning message if WITH_PYTHON3 is disabled
* drop MGR_PYTHON_VERSION option, as we don't support use different
  python version for python binding and ceph-mgr embedded python
  interpreter anymore. as before switching to python3-only build,
  we can build python3 and python2 python bindings, and ceph-mgr
  can use either of them. but after switching to python3-only
  build, ceph-mgr has to use whatever python version used to
  build python binding.
* move WITH_PYTHON3 option to $top_srcdir/CMakeLists.txt, as ceph-mgr
  and python binding will share this option.
* hardware ${PYTHON_VERSION} to 3
* hardware ${Python${PYTHON_VERSION}_VERSION_MAJOR} to 3
* only build boost library with python3
* s/Python_EXECUTABLE/Python3_EXECUTABLE/
* update the build scripts and packagings accordingly
* rename all cython${PYTHON_VERSION}_* targets to cython_*
* update distutils_install_module() so it does not take python_version
  parameter anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 10:58:58 +08:00
Thomas Bechtold
0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00
Roman Penyaev
2268be9ff9 os/bluestore: introduce new io_uring IO engine
This implements low-level IO engine, which utilizes brand-new
io_uring IO interface: https://lwn.net/Articles/776428/

By default libaio is used.  If bluestore_ioring=true is set but kernel
does not support io_uring or architecture is not x86-64, libaio will be
used instead.

In current patch liburing library is used in order not to open code
everything.

In order to compile with liburing WITH_LIBURING=ON should be specified.

Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
2019-12-10 17:22:15 +08:00
Jason Dillaman
1d866ef37d
Merge pull request #31279 from lixiaoy1/rwl-image-writeback-cache-seq1
rbd/cache: Replicated Write Log core codes part 1

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-12-02 09:16:10 -05:00
Sage Weil
0e0a3853c9 Merge PR #31579 into master
* refs/pull/31579/head:
	cmake: add cppcheck and iwyu static analysis targets

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2019-11-25 21:49:18 -06:00
lixiaoy1
242d391408 librbd: add the framework for RWL writeback cache
Signed-off-by: Peterson, Scott <scott.d.peterson@intel.com>
Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
Signed-off-by: Lu, Yuan <yuan.y.lu@intel.com>
Signed-off-by: Chamarthy, Mahati <mahati.chamarthy@intel.com>
2019-11-21 04:02:50 -05:00
Yuval Lifshitz
c876a0d817 cmake: add cppcheck and iwyu static analysis targets
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
2019-11-18 19:43:14 +02:00
Yuval Lifshitz
354d775e04 rgw/pubsub: add kafka notification endpoint
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
2019-11-05 19:25:03 +02:00
Ilsoo Byun
a83a25c076 cmake: require RocksDB 5.14 or higher
error: ‘class rocksdb::Env’ has no member named ‘SetAllowNonOwnerAccess’
       opt.env->SetAllowNonOwnerAccess(false);
                    ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Ilsoo Byun <ilsoobyun@linecorp.com>
2019-10-29 18:04:24 +09:00
Kefu Chai
d82ea5d738 cmake: refactor BuildDPDK
* extract `do_export_dpdk()` into a separated function
* no need to check for `dpdk-ext` target before calling `build_dpdk()`,
  as the name of this target should be hidden from the caller of this
  function.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-24 15:15:51 +08:00
Ricardo Dias
a398f985d4
Merge pull request #30694 from rjfd/wip-dashboard-fix-translations
mgr/dashboard: internationalization support with AOT enabled 

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2019-10-11 14:33:31 +01:00
Ricardo Dias
3fe39d4899
cmake: dashboard: support locale-dependent frontend builds
Fixes: https://tracker.ceph.com/issues/41988

Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-10-10 15:30:54 +01:00
Willem Jan Withagen
f698f3c3ee cmake: Allow cephfs and ceph-mds to be build when building on FreeBSD
on FreeBSD keyutil absence prevents building KRBD and mount.
But on FreeBSD icephfs, ceph-fuse and ceph-mds do work, so we need
ceph-mds to be build.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2019-10-06 02:34:45 +02:00
Samuel Just
670e00a06a */CMakeLists: add EVENTTRACE as cmakedefine, require LTTNG
Because EVENTTRACE now implies LTTNG, also cleanup EVENTTRACE
conditions to assume LTTNG.

Also add missing eventtrace dependencies to rbd and
test/objectstore.

Signed-off-by: Samuel Just <sjust@redhat.com>
2019-09-27 15:55:18 -07:00
Kefu Chai
67bf182aa5 cmake: extract checks into CephChecks.cmake
also use case chosen in the macro definition as per suggested by cmake
document. see
https://cmake.org/cmake/help/latest/command/macro.html#invocation

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-11 12:47:26 +08:00
Kefu Chai
3234fb3982 cmake,run-make-check.sh,deb,rpm: disable SPDK by default
but we still enable it in `run-make-check.sh`

* cmake: disable SPDK by default
* run-make-check.sh: enable WITH_SPDK so at least we can ensure it
  builds
* deb,rpm: add uuid-dev / libuuid-devel as a "make check" dependency

Fixes: https://tracker.ceph.com/issues/41330
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-20 15:38:33 +08:00
Kefu Chai
6fb738abb9 cmake: make WITH_SPDK a dependent option
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-20 15:38:33 +08:00
Kefu Chai
bbb69fe793 cmake: require CMake v3.10.2
since we dropped the support of xenial, we now have the luxury of using
newer CMake! and by using CMake 3.10.2, we can prevent libfmt from
assuming that we are using C++11, and hence set `CMAKE_CXX_STANDARD` to
11, which will literally append `-std=gnu++11` to `CMAKE_CXX_FLAGS`.
the last `-std` option passed to `g++` takes precendence.
since we've switched over to C++17, and we are using C++17 features.
so, using cmake older than 3.8 breaks the build. because it is CMake 3.8
which stared support `CMAKE_CXX_STANDARD` 17.

- for bionic: https://packages.ubuntu.com/bionic/cmake : 3.10.2
- for CentOS7:
https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/c/ : 3.13.5

so in this change,

* bump up the required version to v3.10.2
* cleanups to wipe out the workaround for lower CMake versions
* use `PROJECT_VERSION` defined by `project()` command instead of
  `VERSION` explicitly defined.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-02 22:09:12 +08:00
Kefu Chai
1e33464c0a cmake: use exact version of python if minor version is specified
`find_package(Python ${version}...)` tries to find the greater python version
which is greater than `${version}`, on fc30, at the time of writing, both
python3.8 and python3.7 are offered. but `python3-Cython` is packaged only
for python3.7. so if user installs python3.8, this will prevent user from
building Ceph. as Ceph will not be able to find Cython python module, as it
will try to run `python3.8 -m cython --version`, where python3.8 is the
greatest python version available in the system. but since cython module is
not available to python3.8, cmake will fail to find cython even if is available
to python3.7.

in this change, if user specifies a python version with minor version, we
will use the exact specified version instead of trying to use a version
greater than the specified one.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-07-24 00:45:22 +08:00
Kefu Chai
492efbd694 cmake: use python2 by default
and s/PYTHON_EXECUTABLE/Python_EXECUTABLE/

it's a regression introduced by 5e2bd7fc4d

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-07-22 16:07:56 +08:00
Kefu Chai
5e2bd7fc4d cmake: update FindPython* modules
use the ones shiped from the latest cmake. which

* enables us to find the recent python intepreter and development files,
* find intepreter and development in a single `find_pacakge()` command,
  simpler this way and less error prone.

and to accomodate this change:

* all `PYTHON${PYTHON_VERSION}_*` variables are renamed to
  `Python${PYTHON_VERSION}_*` if we use `find_package(Python2...)` or
  `find_package(Python3...)` to find python2 or python3 instead of using
  `find_package(Python...)`.
* use "2" explicitly when using python2, as `Python_*` variables are not
  defined anymore
* when compiling python support of ceph-mgr, continue using `Python_*`
  variables. because we find the python interpreter and development
  files using `find_pacakge(Python...)` for ceph-mgr.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-07-20 22:35:07 +08:00
Kefu Chai
7910bd6f02
Merge pull request #28802 from lixiaoy1/cmake_pmdk
cmake: pmem/pmdk changes to cmake

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-07-12 14:55:34 +08:00
lixiaoy1
4959835c07 cmake: Add the support to use system PMDK library
Signed-off-by: Scott Peterson <scott.d.peterson@intel.com>
Signed-off-by: Xiaoyan Li <xiaoyan.li@intel.com>
2019-07-10 11:43:27 -04:00
lixiaoy1
d994f02d69 cmake: update HAVE_PMEM to HAVE_BLUESTORE_PMEM
Signed-off-by: Scott Peterson <scott.d.peterson@intel.com>
Signed-off-by: Xiaoyan Li <xiaoyan.li@intel.com>
2019-07-10 11:43:05 -04:00
Kefu Chai
a4ddc4bd85
Merge pull request #27834 from rzarzynski/wip-nss-drop-cms
rgw, common, build: drop NSS support

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-07-05 11:03:33 +08:00
Kefu Chai
d0d8932506 CMakeLists.txt: s/Remote block storage/RADOS Block Device/
RBD is short for RADOS Block Device, not Remote Block Storage.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-06-29 23:47:48 +08:00
Kefu Chai
1400867d92 CMakeLists.txt: fix typo in error message
krbd depends on rbd, so we cannot build krbd without rbd.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-06-29 23:35:48 +08:00
Radoslaw Zarzynski
b9986374aa build, common, crypto, rgw: drop USE_OPENSSL as OpenSSL is obligatory.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2019-06-26 22:11:29 +02:00
Radoslaw Zarzynski
79edb93d06 common, crypto, build: get rid of NSS entirely.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2019-06-26 22:10:17 +02:00
Casey Bodley
13b07e5e6b cmake: fix WITH_UBSAN
CMake Error at cmake/modules/FindSanitizers.cmake:28 (message):
  Unsupported sanitizer: undefined-behavior

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2019-06-24 11:35:27 -04:00
Kefu Chai
c028de2f93 cmake: rewrite Findgenl to support components argument
* rename genl to nl:
  "genl" is not very specific without more context. and libnl is actually
  a library suite. so it would be better if we can rename the library to
  be found to "libnl", and by following the naming convention of CMake,
  in this change, Findgenl.cmake is renamed to Findnl.cmake
* Findnl.cmake: support the component argument, in our specific case,
  what we want is "libnl-genl" library, which is one of the libraries
  offered by libnl. so let's just make it a component.
* Findnl.cmake: should pass the names of the required variables instead of
  their values to `find_package_handle_standard_args()`. before this
  change, we pass `GENL_LIBRARIES` to this function. it was correct at the
  first glance. but it is not able to handle the case where case where
  libnl-genl is not installed. so the fix is to pass all the names of
  required library paths to this function. in this change, their name
  are concatenated to a single variable -- `nl_LIBRARIES`, and the
  value of this variable is passed to
  `find_package_handle_standard_args()`. and the error message would
  be more specific this way if libnl-genl is not found:
    Could NOT find nl (missing: nl_genl_LIBRARY)
* Findnl.cmake: add nl::<component> as imported library, it helps the
  consumer of these libraries to import them -- no need to
  specify the `target_include_directories()` separately anymore.
* move the find_package() code to where it is used. it helps to improve
  the readability.
* remove `HAVE_GENL` variable: it's not used anywhere.
* drop the messages of "Not using foobar", they do not help.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-06-19 21:21:00 +08:00
Mike Christie
8815671553 cmake and build: add netlink lib requirement detection
The next patch adds netlink support to rbd-nbd. This patch just adds the
build related changes to bring in the netlink lib and test and build
against it.

Signed-off-by: Mike Christie <mchristi@redhat.com>
2019-06-04 23:56:53 -05:00
Mike Christie
3fe16add7d cmake: Move WITH_RBD option earlier
The next patch will add a WITH_RBD check to the LINUX check block so we
only check for the netlink libs when those 2 conditions are met, so this
moves the WIT_RBD option setup to before the LINUX check.

Signed-off-by: Mike Christie <mchristi@redhat.com>
2019-06-04 23:56:53 -05:00
Jason Dillaman
7f6685383d librbd: use custom allocator for aligned boost::lockfree::queue
If tcmalloc is in-use as the allocator and its version is less than 2.6.2,
it might be missing support for 'aligned_alloc'. This can result in the
glibc version of 'aligned_alloc' being used to allocate memory that is
then freed by tcmalloc -- resulting in a crash.

Fixes: http://tracker.ceph.com/issues/39703
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-05-15 08:47:41 -04:00
Ricardo Dias
c1e1d6ed0c
Merge pull request #24678 from rouming/master
test/fio: introduce fio ioengine: fio_ceph_messenger

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
2019-03-28 09:20:55 +00:00
Willem Jan Withagen
1f0e443854 cmake: use StdFilesystem::filesystem instead of stdc++fs
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2019-03-24 15:14:12 +01:00
Sage Weil
be1187575b Merge PR #27021 into master
* refs/pull/27021/head:
	msg: remove XioMessenger
	qa/suites/rados/thrash-old-clients: add nautilus
	qa/suites/rados/thrash-old-clients: add mimic v1 variant
	qa/suites/rados/thrash-old-clients: add mimic
	qa/suites/rados/thrash-old-clients: collapse msgr and client choice
	qa: remove simplemessenger tests
	ceph_test_msgr: remove simple
	msg: remove SimpleMessenger

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-03-22 04:42:30 -05:00
Sage Weil
cc9a9142fd msg: remove XioMessenger
There is a lot of good stuff going on here, but nobody is investing in xio
and it is not expected to be the path forward for RDMA.  If that ever
changes, we can resurrect the code.  Until then, let's clean up the tree
and reduce friction for changes going forward.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-03-21 00:57:33 -05:00
Sage Weil
5ed71d25d5 ceph_release: the next release will be octopus
Signed-off-by: Sage Weil <sage@redhat.com>
2019-03-20 00:48:12 -05:00
Jenkins Build Slave User
3a54b2b6d1 14.2.0 2019-03-18 10:08:29 +00:00
Jenkins Build Slave User
ae1b3cf8e2 14.1.1 2019-03-11 16:42:55 +00:00
Jenkins Build Slave User
adfd524c32 14.1.0 2019-02-22 18:07:07 +00:00
Kefu Chai
66fb02dcfe
Merge pull request #26555 from tchaikov/wip-install-build-deps
cmake,rgw: make amqp support optional

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Yuval Lifshitz <yuvalif@yahoo.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
2019-02-22 15:39:55 +08:00
Kefu Chai
8a6658f8a9 cmake: fix syntax error of set()
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-22 13:43:00 +08:00
Ricardo Dias
f42c440158
cmake: add UNIT_TESTS_BUILD preprocessor var based on WITH_TESTS cmake var
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-02-21 16:00:26 +00:00
Kefu Chai
4f154010c9 rgw,cmake: add option "WITH_RADOSGW_AMQP_ENDPOINT"
WITH_RADOSGW_AMQP_ENDPOINT is enabled by default.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-21 20:36:43 +08:00
Kefu Chai
95401d8c2f cmake: find_package(RabbitMQ) instead of just checking its header
rabbitmq-c is not a header-only library. so we need to ensure that the
library is also around before linking against it. in this change:

* move the detection down to where librabbitmq is used
* add FindRabbitMQ.cmake for find_package(RabbitMQ)
* s/rabbitmq/RabbitMQ::RabbitMQ/ as the latter is an alias library
target, which has more information attached to it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-21 19:00:24 +08:00
Yuval Lifshitz
7a33fd8d56 rgw: pubsub add cmake check for rabbitmq
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
2019-02-13 13:30:50 +02:00
Kefu Chai
02bccec954 cmake: use sphinx-build-3 as an alternative
on fc30, there is no reason to stick with sphinx-build and ignore
sphinx-build-3!

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-07 15:35:16 +08:00
Sage Weil
9aaa354cad build: disable kerberos for nautilus
We can re-enable after we branch.  For N, though, there is no point in dragging
in the dependencies and implying there is something that works.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-02-03 14:27:49 -06:00
Roman Penyaev
fb360cebf5 test/fio: introduce fio ioengine: fio_ceph_messenger
This patch introduces new FIO engine which main goal is to test
bare Ceph messenger transport layer performance.  Engine submits
requests in async manner and polls for completion.  Completions
are kept in lockless ring buffer so on hot path no muteces or
conditions are used in order to get maximum bandwidth and less
latency.

Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
2019-01-16 15:53:49 +01:00
Alan Somers
9ae94e48be os/bluestore: support for FreeBSD
Signed-off-by: Alan Somers <asomers@gmail.com>
2018-12-22 00:21:56 +08:00
Kefu Chai
e57649dd9c
Merge pull request #22800 from wjwithagen/wjw-ctest-timeout
cmake: allow setting of the CTest timeout during building.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-12-21 23:40:27 +08:00
oliveiradan
67784065ce auth: Kerberos authentication
Signed-off-by: Daniel Oliveira <doliveira@suse.com> (github: oliveiradan)
2018-12-03 18:55:46 -07:00
Willem Jan Withagen
fd71812f87 cmake: allow setting of the CTest timeout during building.
It is rather had to overide a once set timeout during CTesting.
This is the best next compromise. Disadvantage is that a rebuild
is required.
But it helps in my Jenkins testing timely catching run-away programs.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2018-10-29 23:16:33 +01:00
Boris Ranto
1ade714910 cmake: Support grafana dashboard installation
We are currently hosting the grafana dashboards in our repo but we do
not install them. This patch adds the cmake support.

Signed-off-by: Boris Ranto <branto@redhat.com>
2018-10-25 17:09:02 +02:00
Kefu Chai
86af98f42d
Merge pull request #24692 from tchaikov/wip-cmake-with-asan
cmake: fixes to enable WITH_ASAN with clang and GCC

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-10-23 19:26:59 +08:00
Kefu Chai
b605210b97 cmake: pass Sanitizers flags to linker for linking .so
see
https://github.com/google/sanitizers/wiki/AddressSanitizer#using-addresssanitizer

to be specific,

> In order to use AddressSanitizer you will need to compile and link your
> program using `clang` with the `-fsanitize=address` switch.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-10-22 14:40:03 +08:00
Alan Somers
e31acf6567 blkdev: FreeBSD support
Signed-off-by: Alan Somers <asomers@gmail.com>
2018-10-19 19:37:42 +08:00
Marcin Juszkiewicz
ee3af68dd9 cmake: mark gcc 7 as minimum C++ compiler (due to std++17)
Ceph requires C++17 support from compiler. This means gcc 7.x being
minimal version supported.

This also allows to fail quick on Debian 'stretch' with it's gcc 6.3
compiler.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
2018-10-16 16:34:03 +02:00
Kefu Chai
1fb419ca76 cmake: use OpenSSL::Crypto instead of OPENSSL_LIBRARIES
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-10-10 00:20:14 +08:00
Patrick Donnelly
5cdf9c3380
Merge PR #24020 into master
* refs/pull/24020/head:
	*: set missing CLOEXEC on opened fds
	msg: set O_NONBLOCK on file status flags

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2018-09-25 09:20:22 -07:00
Sage Weil
c3f70dc4a8 common/ceph_mutex: ceph::{mutex,condition_variable,lock_guard}
If CEPH_DEBUG_MUTEX is defined, use the [recursive_]mutex_debug classes
that implement lockdep and a bucnh of other random debug checks.  Also
typedef ceph::condition_variable to std::condition_variable_debug, which
adds addition assertions and debug checks.

If CEPH_DEBUG_MUTEX is not defined, then use the bare-bones C++ std::mutex
primitives... or as close as we can get to them.

Since the [recursive_]mutex_debug classes take a string argument for the
lockdep piece, define factory functions ceph::make_[recursive_]mutex that
either pass arguments to the debug implementations or toss them out.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-09-21 11:55:56 -05:00
Patrick Donnelly
86dbd9e755
*: set missing CLOEXEC on opened fds
Otherwise these descriptors may leak across execve() during e.g. MDS respawn.

Fixes: http://tracker.ceph.com/issues/35850

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-09-20 08:06:08 -07:00
Kefu Chai
07a3e8d7a6
Merge pull request #23650 from tchaikov/wip-dpdk-cmake
cmake: fix the build WITH_DPDK=ON

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-09-14 23:44:01 +08:00
Kefu Chai
195470a295 cmake: always add ${Boost_INCLUDE_DIRS} to include dirs
we need to -I${Boost_INCLUDE_DIRS} if WITH_SYSTEM_BOOST=ON and boost is
found by FindBoost.cmake.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-11 22:22:47 +08:00
Kefu Chai
a4c396d111 cmake: support multi-arch lib directory used along with BOOST_ROOT
by default, debian packaging creates ${prefix}/lib/x86_64-linux-gnu for
multi-arch support. but FindBoost.cmake does not check in such a
directory if $BOOST_ROOT is set. in this change, this directory is added
to the search path.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-11 22:22:47 +08:00
Kefu Chai
2c823a18cb cmake: pass DPDK_DIR explicitly
so we don't rely on build_dpdk() to be a macro to set variables in
its parent scope.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-05 17:33:59 +08:00
Willem Jan Withagen
39d831f95d core: make pthread_get_name_np work when available
FreeBSD will have a pthread_get_name_np() in libpthread
Code for that was submitted

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2018-08-19 12:07:56 +02:00
Kefu Chai
65f6a3c564 cmake: honour CMAKE_REQUIRED_LIBRARIES in CheckIncludeFiles
to silence cmake warning regarding to CMP0075

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-17 14:08:57 +08:00
Kefu Chai
e2e6a77b38
Merge pull request #23510 from tchaikov/wip-cmake-boost-build
cmake: fix build WITH_SYSTEM_BOOST=ON

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-08-13 21:42:10 +08:00
Kefu Chai
46c8b04a98 cmake: fix build WITH_SYSTEM_BOOST=ON
FindBoost.cmake from upstream cmake now finds python libraries like

find_package(Boost 1.67 python36)

and it export targets like Boost::python36

but we are still linking against Boost::python, so to be compatible
with FindBoost.cmake, we need to update BuildBoost.cmake and
mgr/CMakeLists.txt accordingly. in other words, to export
Boost::python36 and to link Boost::python36.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-09 18:57:04 +08:00
Kefu Chai
72cc4cedd4
Merge pull request #23441 from tchaikov/wip-cmake-rocksdb-cleanup
cmake: rocksdb related cleanup

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-08-09 00:46:53 +08:00
Sage Weil
3988351227 Merge PR #23432 into master
* refs/pull/23432/head:
	Revert "rocksdb: pickup change to link against libsnappy.a"
	cmake,make-dist: revert "build gperftools if WITH_STATIC_LIBSTDCXX"
	cmake: cleanup snappy related script
	debian: strip "-Wl,-Bsymbolic-functions" from LDFLAGS
2018-08-07 08:59:39 -05:00
Willem Jan Withagen
3b776457fe FreeBSD: update build script to current state
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2018-08-06 23:42:06 +02:00
Kefu Chai
c81f143411 cmake: add ALLOCATOR option
ALLOCATOR is in fact an option..

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-06 19:37:43 +08:00
Kefu Chai
5a71bbbe59 cmake: refactor RocksDB related script
* rename Findrocksdb.cmake to FindRocksDB.cmake to match its name
* add RocksDB::RocksDB target to BuildRocksDB.cmake and
  FindRocksDB.cmake
* use RocksDB::RocksDB target instead of accessing its property
  directly, and do not link against its dependencies explicitly.
  let its INTERFACE_LINK_LIBRARIES do the job.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-06 19:37:43 +08:00
Kefu Chai
4b09b2fbc4 cmake,make-dist: revert "build gperftools if WITH_STATIC_LIBSTDCXX"
as the higher version of libstdc++ is backward compatible with the lower
ones. so there is no need to statically link against C++ libraries. they
can always use the libstdc++ ships with the distro.

This reverts commit a6c73b6ac1

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-06 18:30:38 +08:00
Kefu Chai
a7326ee0f4 cmake: extract sanitizer detection out
also, we don't need to pass '-lasan' or '-ltsan' to linker. it's
suggested to use the "-fsanitize=${sanitizer}".

please note, this module is compatible with the one used in seastar on
purpose, as seastar is included in ceph using add_subdirectory(), and it
in turn add its own cmake modules directory using list(APPEND ...), so
cmake/modules/FindSantitizers.cmake is prefered over
src/seastar/cmake/FindSantitizers.cmake.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-02 14:43:47 +08:00
Kefu Chai
0912caefa9
Merge pull request #23300 from tchaikov/wip-cmake-cleanup
cmake: cleanups

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-08-02 10:14:09 +08:00