Commit Graph

551 Commits

Author SHA1 Message Date
Laura Flores
0a2572c78c
Merge pull request #53191 from rzarzynski/wip-all-kickoff-s-2
kickoff v19 squid
2023-12-22 14:16:49 -06:00
Kefu Chai
485f34b114
Merge pull request #54916 from tchaikov/cmake-boost-workaround
cmake: only apply workaround for boost < 1.84

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2023-12-20 10:14:38 +08:00
Christoph Grüninger
d57b799ff0 cmake: Do not set CMake policy to new that are set anyway
CMP0097 and below are all implicitly set to new because
the minimum required CMake version is 3.16 and these
policies are older.

Signed-off-by: Christoph Grüninger <foss@grueninger.de>
2023-12-17 22:18:43 +01:00
Kefu Chai
c24a4c1984 cmake: only apply workaround for boost < 1.84
https://github.com/boostorg/phoenix/issues/111 was fixed in master.
see the fix which addresses the issue:
8913607a37

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2023-12-15 18:07:35 +08:00
Radoslaw Zarzynski
0c0767e243 cmake, doc: bump project version to 19.0.0 for squid
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2023-12-04 16:27:50 +01:00
Patrick Donnelly
536b054167
cmake: do not issue CMAKE_BUILD_TYPE warning if set
Fixes: b8c6ba01b2
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-10-31 10:55:44 -04:00
Casey Bodley
05c341b30d cmake: define BOOST_ASIO_HAS_IO_URING for WITH_LIBURING
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2023-10-20 09:18:30 -04:00
Patrick Donnelly
3438de58f2
cmake: promote uring package search to top-level
For use by multiple projects, rocksdb in particular.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-10-17 13:00:14 -04:00
Patrick Donnelly
b8c6ba01b2
CMakeLists: warn if CMAKE_BUILD_TYPE is set/unset
At some point the debug builds for wip branches no longer had the .git
directory available so the Debug build type was unset. This meant we are
no longer doing numerous checks (like mutex ownership checks) that we
would normally be doing in the qa suite.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-10-16 12:01:06 -04:00
Daniel Gryniewicz
a4b19133f1
Merge pull request #52933 from dang/wip-dang-posix-driver
RGW - Add POSIX Driver

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
2023-09-15 08:58:52 -04:00
Daniel Gryniewicz
5258bcbd73 RGW - Add POSIX Driver
This is the MVP for a driver for RGW that operates on top of a POSIX
filesystem.  It supports get, put, list, copy, multipart, external
access via the filesystem itself, and ordered bucket listings via an
LRU-based cache.

Note that this is currently a Filter, indended to run on top of dbstore.
This is because it currently doesn't have any User implementation, so it
depends on dbstore's User.  Everything else is implemented in
POSIXDriver.  Once there is a User implementation, this will become a
Store, instead of a Filter.

Commit messages from bucket listing cache:

  rgw/posixdriver: recycle lmdb database handles as required

    While LMDB workflows often do not close/return database handles,
    ours continually reuses them.  This requires us to close each
    handle (atomically) when a cache entry is recycled.

  rgw/posixdriver: don't instantiate bucket cache entries from notify events

  rgw/posixdriver: incorporate lmdb-safe for now

    The current inclusion is based on https://github.com/Martchus/lmdb-safe,
    which is actively maintained but currently has some packaging issues the
    author has agreed to accept fixes for.

    For now, skip the submodule to save time and remove an external dependency.

  rgw/posixdriver: fix listing of cached, empty bucket

    * check lmdb enumeration result in all cases and w/better style
    * add unit test for enumeration of an empty cached directory

  rgw/posixdriver: nest lmdbs in a directory under the dbroot path to avoid cleanup issues

  rgw/posixdriver: refactor for posix integration

    * Derive BucketCache types as templates on a SAL driver and SAL
      bucket pair.

    * Integrate cache fills as callbacks into SAL layer (or mock, for
      tests)

    * Renaming and cleanups

  rgw/posixdriver: add bucket cache implementation and tests

    Adds free-standing cache of buckets and object names, with
    bucket names (and listing attributes, upcoming) managed in
    a hashed set of lmdb databases, which provides ordering and
    a high-performance listing cache.

    An framework for notification on new object creation (e.g.,
    outside S3 workflow) is provided, and a Linux implementation
    using inotify.

    FindLMDB.cmake taken with attribution and license.

  rgw/posixdriver: add zpp_bits serialization (FAST)

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2023-09-14 12:09:40 -04:00
Ilya Dryomov
ff570c6132
Merge pull request #51197 from petrutlucian94/mingw-llvm
windows: use mingw-llvm

Reviewed-by: Adam Emerson <aemerson@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2023-09-01 16:21:35 +02:00
Lucian Petrut
4b43afd509 common: skip boost shared_mutex with mingw-llvm
Because of winpthreads issues, we had to use Boost's shared_mutex
implementation.

When using mingw-llvm, we can safely use libc++'s shared mutex
implementation.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2023-08-30 12:59:00 +00:00
Kefu Chai
fb93d6e032 cmake: update FindPython3 module
* use the one shiped by the latest CMake (ab379e5054aa792df9572078dcf95bddd75f7661)
* use the new policy to use the new find strategy.
* accomodate the vanilla FindPython3 module to Ceph by:
  - dropping the `cmake_policy()` calls which set the policy not supported
    by 3.16.
  - `include (FindPackageHandleStandardArgs)` without specifying the
    relative path.
  - dropping the `HANDLE_VERSION_RANGE` from `FindPackageHandleStandardArgs()` call.
    this option was introduced by CMake v3.19, see
    https://cmake.org/cmake/help/latest/module/FindPackageHandleStandardArgs.html
    but Ubuntu focal comes with CMake 3.16, which is our minimal required CMake version.

the new FindPython3 module from CMake:

* enables us to find the recent Python intepreter and development files up to
  CPython 3.13.
* finds intepreter with the new `Python_FIND_STRATEGY`. the old and default
  strategy always finds the most recent version with all specified name
  and in all locations. so, if /usr/bin/python exists, it would accept, even
  if it is  a symlink to python3.9 and what we want is python3.6. while
  the new policy stops at the one which satisfies the constraints.
  simpler this way and less error prone.

Fixes: https://tracker.ceph.com/issues/62428
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2023-08-17 10:16:45 +08:00
Lucian Petrut
5fd67e1f88 build: globally set FMT_USE_TZSET=0 for Windows
We're currently setting FMT_USE_TZSET=0 when building libfmt
in order to avoid the _tzset function, which is unavailable
under Mingw:
aa5769ecf1

The issue is that it still gets used by fmt/chrono.h, which is
why we'll move this definition to the top level cmake file.

Note that the Windows build is currently failing as a result of
a recent change: https://github.com/ceph/ceph/pull/52590/files

  In file included from ceph/src/common/ceph_time.h:22,
                   from ceph/src/include/encoding.h:31,
                   from ceph/src/include/uuid.h:9,
                   from ceph/src/include/types.h:21,
                   from ceph/src/crush/CrushWrapper.h:14,
                   from ceph/src/crush/CrushCompiler.h:7,
                   from ceph/src/crush/CrushCompiler.cc:4:
  ceph/src/fmt/include/fmt/chrono.h: In lambda function:
  ceph/src/fmt/include/fmt/chrono.h:953:5: error: ‘_tzset’ was
  not declared in this scope; did you mean ‘tzset’?
    953 |     _tzset();
        |     ^~~~~~
        |     tzset

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2023-07-28 14:34:37 +00:00
Adam C. Emerson
244c5ebbd4 build: Bump boost to 1.82
Needed to fix coroutine detection under Clang

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2023-07-05 15:45:07 -04:00
Samarah
5a9a5ba4a3 RGW: Change cmake option descriptions from Rados to RADOS
Signed-off-by: Samarah <samarah.uriarte@ibm.com>
2023-06-09 10:42:53 -04:00
Casey Bodley
4167b5c797
Merge pull request #48879 from samarahu/wip-d4n
RGW: WIP D4N

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
2023-06-08 11:44:55 -04:00
Ilya Dryomov
1caadd7f2a
Merge pull request #50341 from yangdongsheng/ubbd
rbd: add support for new device type of ubbd

Reviewed-by: Mykola Golub <mykola.golub@clyso.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2023-06-05 23:12:28 +02:00
samarah
8d37f60c10 RGW: Add D4N classes and unit testing; update cpp_redis submodule
Signed-off-by: samarah <suriarte@redhat.com>
2023-06-05 13:06:46 -04:00
Matan Breizman
e6d56c1eff CMakeLists.txt: increase verbosity for selected allocator
Unless the allocator was set on command line, we will select one based on the following order:
```
"specify memory allocator to use. currently tcmalloc, tcmalloc_minimal, \
jemalloc, and libc is supported. if not specified, will try to find tcmalloc, \
and then jemalloc. If neither of then is found. use the one in libc.")
```
with this change, cmake will explicitly message the compiler selected,
otherwise we have no option to identify the one which is being used.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2023-05-31 11:12:43 +00:00
Dongsheng Yang
54853a5ae7 tools/rbd: add support of new device type for ubbd
ubbd (Userspace Backend Block Device) is a method to build block device
and handle IO by process started in userspace. That means we can provide
a generic block device to user and handle IO requests by librbd
in linux.

This way, we can allow user to use rbd image as a linux block device
supporting full image features, especial the journaling feature, which
is not supported by krbd.

For more information: https://github.com/DataTravelGuide/ubbd

Signed-off-by: Dongsheng Yang <dongsheng.yang.linux@gmail.com>
2023-05-18 12:35:39 +00:00
Ali Maredia
414bdd4cc5 rgw: add conditional backtrace logging after "WARNING: blocking librados call"
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2023-01-24 14:04:01 -05:00
J. Eric Ivancich
aba9bb728d rgw: allow Arrow Flight to be built and linked into ceph components
Arrow Flight integration is triggered by defining
WITH_RADOSGW_ARROW_FLIGHT=ON with the cmake invocation.

For now this assumes that grpc-plugins is installed on the system and
won't be built internally.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
2022-12-15 12:49:35 -05:00
Radoslaw Zarzynski
bf46d3736d
Merge pull request #47458 from rzarzynski/wip-all-kickoff-r
kickoff v18 reef

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
2022-10-04 22:39:19 +02:00
Lucian Petrut
9921c8a355
Merge pull request #48148 from ktdreyer/win-remove-curl
win32: remove libcurl
2022-09-23 10:43:44 +03:00
Casey Bodley
54caaf757f cmake: bump project version to 18.0.0 for reef
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 9319d56319)
2022-09-20 14:26:59 +00:00
Ken Dreyer
bacbfccb20 win32: remove libcurl
The Windows client does not use libcurl for anything. Remove it to
simplify the build process.

Note, if we ever add libcurl back on Windows, we should disable unused
protocols to harden the build:

  --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp \
  --disable-dict --disable-telnet --disable-tftp --disable-pop3 \
  --disable-imap --disable-smb --disable-smtp --disable-gopher \
  --disable-mqtt --disable-manual --disable-ntlm

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2022-09-16 14:30:39 -04:00
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
Kefu Chai
2e9f5ae081
Merge pull request #47829 from tchaikov/wip-cmake-CMP0135
cmake: set CMP0135 policy 

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2022-08-31 17:51:44 +08:00
Kefu Chai
8103d11bd8 cmake: set CMP0135 policy
so the `DOWNLOAD_EXTRACT_TIMESTAMP` property of
`ExternalProject_Add()` command is set by default on CMake v3.24 and up.
it helps to set the a more accurate timestamp for the downloaded
content, hence the targets depending on the extracted content can be
rebuilt if the URL changes.

see also https://cmake.org/cmake/help/latest/policy/CMP0135.html

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-27 09:56:47 +08:00
Kefu Chai
591e0c6195 cmake: use a loop for setting new policies
we were using a for loop for this purpose, but the for loop was unrolled
when we bumped up the required cmake version.

this change paves the road to setting "CMP0135" to "NEW". this policy
is a new one introduced by CMake v3.24.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-27 09:49:27 +08:00
Mark Kogan
692b99d1cf build: fix WITH_BOOST_VALGRIND config value was set after the fact
https://tracker.ceph.com/issues/56500

Signed-off-by: Mark Kogan <mkogan@redhat.com>
2022-08-18 14:45:20 +03:00
Kefu Chai
9ff4b5a1a3
Merge pull request #46989 from petrutlucian94/boost_shared_mutex
common: use boost::shared_mutex on Windows

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2022-08-06 11:00:27 +08:00
Lucian Petrut
35b67b2558 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>
2022-07-27 11:50:42 +00:00
Nizamudeen A
42fd81f1bd
Merge pull request #46945 from rhcs-dashboard/rbd-e2e
mgr/dashboard: rbd-mirroring e2e tests

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
2022-07-26 19:51:06 +05:30
Deepika Upadhyay
93e5d787ef cmake: add rbd-mirror executable to run-make-check
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
(cherry picked from commit e2b46020317e4d4e37c281a6b1817711e0826a37)
2022-07-26 13:50:29 +05:30
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
Kefu Chai
e56e85b891 cmake: use CMAKE_<LANG>_COMPILER_LAUNCHER for configuring ccache
ccache only works for c and c++, so instead of using the universal
`RULE_LAUNCH_COMPILE` use `CMAKE_<LANG>_COMPILER_LAUNCHER` instead,
so ccache is only configured for c and c++ compilation. this is a better
solution for integrating ccache into our building system.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-06-25 22:44:24 +08:00
Yuri Weinstein
cac4b1256d
Merge pull request #45750 from m-ildefons/boost-b2-jobs
cmake: configure boost build with concurrent jobs

Reviewed-by: Kefu Chai <kchai@redhat.com>
2022-06-15 13:25:56 -07:00
Moritz Röhrich
e8ddf7cfdc
cmake: configure boost build with concurrent jobs
When building boost, try to schedule multiple build jobs in parallel. If
provided with `-DBOOST_J=<n>`, the given number of jobst is going to be
used.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
2022-05-31 10:09:24 +02:00
Omri Zeneva
644c99826d cmake: set WITH_JAEGER=ON by default
Signed-off-by: Omri Zeneva <ozeneva@redhat.com>
2022-05-17 04:38:00 -04:00
Kefu Chai
417774f60b
Merge pull request #46142 from tchaikov/wip-cmake-fuse
cmake: mark FUSE REQUIRED if WITH_FUSE

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-13 20:58:14 +08:00
Kefu Chai
6e102a4de8 cmake: mark FUSE REQUIRED if WITH_FUSE
in src/CMakeLists.txt, if "WITH_FUSE" is true, we always link ceph-fuse
against FUSE::FUSE no matter what FUSE_FOUND is.

to avoid the FTBFS when FUSE is not found when building ceph-fuse, we'd
better fail early by marking FUSE a must have.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-05-04 19:23:16 +08:00
Kefu Chai
677e134606 cmake: restructure allocator related code
before this change, the ALLOCATOR cmake option are handled at two
difference places: one to handle ALLOCATOR option, another to add
compilation options based on ALLOCATOR. after this change:

* the ALLOCATOR option is handled in a single place
* dedup the branches handling different ALLOCATORS into a single
  condition: (NOT ALLOCATOR STREQUAL "libc")
* add_compile_options() calls are consolidated into a single one

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-05-02 11:54:08 +08:00
Kefu Chai
8e7f49c256
Merge pull request #45978 from tchaikov/wip-cmake-python3-exact
cmake/modules: use exact version of python3 when finding cython

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2022-04-22 07:10:02 +08: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
c51b3c3a17 cmake: try to find dml only if PMEM is enabled
as the feature dependent on DML library requires PMEM backend.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-04-21 06:28:09 +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