From cc9865b257035ee7e890f3a63c423a962e950f7a Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 11 Jul 2024 10:46:03 -0400 Subject: [PATCH] ceph-19.1.0 RC Signed-off-by: Kaleb S. KEITHLEY --- 0008-cmake-modules-Finduring.cmake.patch | 11 - ...ke_modules-ThirdpartyToolchain.cmake.patch | 11 - 0025-src-osd-scrubber-scrub_backend.h.patch | 32 - 0026-src-osd-scrubber-scrub_backend.cc.patch | 199 ---- ...-src-kv-rocksdb_cache-ShardedCache.h.patch | 151 --- 0030-src-rgw-rgw_asio_client.cc.patch | 61 -- 0036-18.2.1.release.patch | 986 ------------------ 0036-src-cephadm-build.py.patch | 11 + 0039-src-common-dout.h.patch | 37 - 0040-gcc-14.patch | 41 + ...c-boost-boost-python-call_method.hpp.patch | 11 + 0041-src-mgr-PyModule.cc.patch | 19 + 0042-src-common-dout.h.patch | 141 +++ 0043_src_common_crc32c_ppc_asm.S.patch | 15 + ceph.spec | 295 ++---- sources | 2 +- 16 files changed, 333 insertions(+), 1690 deletions(-) delete mode 100644 0008-cmake-modules-Finduring.cmake.patch delete mode 100644 0020-src-arrow-cpp-cmake_modules-ThirdpartyToolchain.cmake.patch delete mode 100644 0025-src-osd-scrubber-scrub_backend.h.patch delete mode 100644 0026-src-osd-scrubber-scrub_backend.cc.patch delete mode 100644 0027-src-kv-rocksdb_cache-ShardedCache.h.patch delete mode 100644 0030-src-rgw-rgw_asio_client.cc.patch delete mode 100644 0036-18.2.1.release.patch create mode 100644 0036-src-cephadm-build.py.patch delete mode 100644 0039-src-common-dout.h.patch create mode 100644 0040-gcc-14.patch create mode 100644 0041-src-boost-boost-python-call_method.hpp.patch create mode 100644 0041-src-mgr-PyModule.cc.patch create mode 100644 0042-src-common-dout.h.patch create mode 100644 0043_src_common_crc32c_ppc_asm.S.patch diff --git a/0008-cmake-modules-Finduring.cmake.patch b/0008-cmake-modules-Finduring.cmake.patch deleted file mode 100644 index 61b93f7..0000000 --- a/0008-cmake-modules-Finduring.cmake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ceph-16.1.0-43-g6b74fb5c/cmake/modules/Finduring.cmake.orig 2021-02-01 08:45:39.316108287 -0500 -+++ ceph-16.1.0-43-g6b74fb5c/cmake/modules/Finduring.cmake 2021-02-01 08:45:59.813665378 -0500 -@@ -5,7 +5,7 @@ - # uring_FOUND - True if uring found. - - find_path(URING_INCLUDE_DIR liburing.h) --find_library(URING_LIBRARIES liburing.a liburing) -+find_library(URING_LIBRARIES liburing.so liburing) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(uring DEFAULT_MSG URING_LIBRARIES URING_INCLUDE_DIR) diff --git a/0020-src-arrow-cpp-cmake_modules-ThirdpartyToolchain.cmake.patch b/0020-src-arrow-cpp-cmake_modules-ThirdpartyToolchain.cmake.patch deleted file mode 100644 index 1b16567..0000000 --- a/0020-src-arrow-cpp-cmake_modules-ThirdpartyToolchain.cmake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ceph-17.1.0-175-g086c8f84/src/arrow/cpp/cmake_modules/ThirdpartyToolchain.cmake.orig 2022-04-08 11:27:53.593570634 -0400 -+++ ceph-17.1.0-175-g086c8f84/src/arrow/cpp/cmake_modules/ThirdpartyToolchain.cmake 2022-04-08 11:28:20.778087653 -0400 -@@ -1991,7 +1991,7 @@ - - if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE" - )) -- set(xsimd_SOURCE "BUNDLED") -+ set(xsimd_SOURCE "SYSTEM") - resolve_dependency(xsimd) - # TODO: Don't use global includes but rather target_include_directories - include_directories(SYSTEM ${XSIMD_INCLUDE_DIR}) diff --git a/0025-src-osd-scrubber-scrub_backend.h.patch b/0025-src-osd-scrubber-scrub_backend.h.patch deleted file mode 100644 index 622daaa..0000000 --- a/0025-src-osd-scrubber-scrub_backend.h.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- ceph-18.0.0-1810-g728e8ac0/src/osd/scrubber/scrub_backend.h.orig 2023-01-18 16:35:03.398700052 -0500 -+++ ceph-18.0.0-1810-g728e8ac0/src/osd/scrubber/scrub_backend.h 2023-01-18 16:37:55.882677965 -0500 -@@ -183,20 +183,20 @@ - // note: 'if' chain, as hard to consistently (on all compilers) avoid some - // warnings for a switch plus multiple return paths - if (as_auth.possible_auth == shard_as_auth_t::usable_t::not_usable) { -- return format_to(ctx.out(), -- "{{shard-not-usable:{}}}", -- as_auth.error_text); -+ return fmt::format_to(ctx.out(), -+ "{{shard-not-usable:{}}}", -+ as_auth.error_text.c_str()); - } - if (as_auth.possible_auth == shard_as_auth_t::usable_t::not_found) { -- return format_to(ctx.out(), "{{shard-not-found}}"); -+ return fmt::format_to(ctx.out(), "{{shard-not-found}}"); - } -- return format_to(ctx.out(), -- "{{shard-usable: soid:{} {{txt:{}}} }}", -- as_auth.oi.soid, -- as_auth.error_text); -+ return fmt::format_to(ctx.out(), -+ "{{shard-usable: soid:{} {{txt:{}}} }}", -+ as_auth.oi.soid, -+ as_auth.error_text.c_str()); - - } else { -- return format_to( -+ return fmt::format_to( - ctx.out(), - "usable:{} soid:{} {{txt:{}}}", - (as_auth.possible_auth == shard_as_auth_t::usable_t::usable) ? "yes" diff --git a/0026-src-osd-scrubber-scrub_backend.cc.patch b/0026-src-osd-scrubber-scrub_backend.cc.patch deleted file mode 100644 index 2fdc52a..0000000 --- a/0026-src-osd-scrubber-scrub_backend.cc.patch +++ /dev/null @@ -1,199 +0,0 @@ ---- ceph-18.0.0-2148-g9754cafc/src/osd/scrubber/scrub_backend.cc.orig 2023-02-08 16:01:53.800709761 -0500 -+++ ceph-18.0.0-2148-g9754cafc/src/osd/scrubber/scrub_backend.cc 2023-02-11 05:06:14.954254050 -0500 -@@ -507,11 +507,11 @@ - } - } - -- dout(10) << fmt::format("{}: selecting osd {} for obj {} with oi {}", -+ dout(10) << fmt::format("{}: selecting osd {} for obj {} with oi {:p}", - __func__, - ret_auth.auth_shard, - ho, -- ret_auth.auth_oi) -+ (void*)&ret_auth.auth_oi) - << dendl; - - return ret_auth; -@@ -1171,23 +1171,23 @@ - - if (auth.digest_present && candidate.digest_present && - auth.digest != candidate.digest) { -- format_to(std::back_inserter(out), -- "data_digest {:#x} != data_digest {:#x} from shard {}", -- candidate.digest, -- auth.digest, -- auth_shard); -+ fmt::format_to(std::back_inserter(out), -+ "data_digest {:#x} != data_digest {:#x} from shard {}", -+ candidate.digest, -+ auth.digest, -+ auth_shard); - error = true; - obj_result.set_data_digest_mismatch(); - } - - if (auth.omap_digest_present && candidate.omap_digest_present && - auth.omap_digest != candidate.omap_digest) { -- format_to(std::back_inserter(out), -- "{}omap_digest {:#x} != omap_digest {:#x} from shard {}", -- sep(error), -- candidate.omap_digest, -- auth.omap_digest, -- auth_shard); -+ fmt::format_to(std::back_inserter(out), -+ "{}omap_digest {:#x} != omap_digest {:#x} from shard {}", -+ sep(error), -+ candidate.omap_digest, -+ auth.omap_digest, -+ auth_shard); - obj_result.set_omap_digest_mismatch(); - } - -@@ -1195,24 +1195,24 @@ - if (m_is_replicated) { - if (auth_oi.is_data_digest() && candidate.digest_present && - auth_oi.data_digest != candidate.digest) { -- format_to(std::back_inserter(out), -- "{}data_digest {:#x} != data_digest {:#x} from auth oi {}", -- sep(error), -- candidate.digest, -- auth_oi.data_digest, -- auth_oi); -+ fmt::format_to(std::back_inserter(out), -+ "{}data_digest {:#x} != data_digest {:#x} from auth oi {:p}", -+ sep(error), -+ candidate.digest, -+ auth_oi.data_digest, -+ (void*)&auth_oi); - shard_result.set_data_digest_mismatch_info(); - } - - // for replicated: - if (auth_oi.is_omap_digest() && candidate.omap_digest_present && - auth_oi.omap_digest != candidate.omap_digest) { -- format_to(std::back_inserter(out), -- "{}omap_digest {:#x} != omap_digest {:#x} from auth oi {}", -- sep(error), -- candidate.omap_digest, -- auth_oi.omap_digest, -- auth_oi); -+ fmt::format_to(std::back_inserter(out), -+ "{}omap_digest {:#x} != omap_digest {:#x} from auth oi {:p}", -+ sep(error), -+ candidate.omap_digest, -+ auth_oi.omap_digest, -+ (void*)&auth_oi); - shard_result.set_omap_digest_mismatch_info(); - } - } -@@ -1241,7 +1241,7 @@ - auth_bl.push_back(auth_attr->second); - - if (!can_bl.contents_equal(auth_bl)) { -- format_to(std::back_inserter(out), "{}object info inconsistent ", sep(error)); -+ fmt::format_to(std::back_inserter(out), "{}object info inconsistent ", sep(error)); - obj_result.set_object_info_inconsistency(); - } - } -@@ -1261,7 +1261,7 @@ - auth_bl.push_back(auth_attr->second); - - if (!can_bl.contents_equal(auth_bl)) { -- format_to(std::back_inserter(out), "{}snapset inconsistent ", sep(error)); -+ fmt::format_to(std::back_inserter(out), "{}snapset inconsistent ", sep(error)); - obj_result.set_snapset_inconsistency(); - } - } -@@ -1284,7 +1284,7 @@ - auth_bl.push_back(auth_hi->second); - - if (!can_bl.contents_equal(auth_bl)) { -- format_to(std::back_inserter(out), "{}hinfo inconsistent ", sep(error)); -+ fmt::format_to(std::back_inserter(out), "{}hinfo inconsistent ", sep(error)); - obj_result.set_hinfo_inconsistency(); - } - } -@@ -1296,22 +1296,22 @@ - - uint64_t oi_size = logical_to_ondisk_size(auth_oi.size); - if (oi_size != candidate.size) { -- format_to(std::back_inserter(out), -- "{}size {} != size {} from auth oi {}", -- sep(error), -- candidate.size, -- oi_size, -- auth_oi); -+ fmt::format_to(std::back_inserter(out), -+ "{}size {} != size {} from auth oi {:p}", -+ sep(error), -+ candidate.size, -+ oi_size, -+ (void*)&auth_oi); - shard_result.set_size_mismatch_info(); - } - - if (auth.size != candidate.size) { -- format_to(std::back_inserter(out), -- "{}size {} != size {} from shard {}", -- sep(error), -- candidate.size, -- auth.size, -- auth_shard); -+ fmt::format_to(std::back_inserter(out), -+ "{}size {} != size {} from shard {}", -+ sep(error), -+ candidate.size, -+ auth.size, -+ auth_shard); - obj_result.set_size_mismatch(); - } - -@@ -1320,11 +1320,11 @@ - if (candidate.size > m_conf->osd_max_object_size && - !obj_result.has_size_too_large()) { - -- format_to(std::back_inserter(out), -- "{}size {} > {} is too large", -- sep(error), -- candidate.size, -- m_conf->osd_max_object_size); -+ fmt::format_to(std::back_inserter(out), -+ "{}size {} > {} is too large", -+ sep(error), -+ candidate.size, -+ m_conf->osd_max_object_size); - obj_result.set_size_too_large(); - } - -@@ -1340,10 +1340,10 @@ - - auto cand = candidate.attrs.find(k); - if (cand == candidate.attrs.end()) { -- format_to(std::back_inserter(out), "{}attr name mismatch '{}'", sep(error), k); -+ fmt::format_to(std::back_inserter(out), "{}attr name mismatch '{}'", sep(error), k); - obj_result.set_attr_name_mismatch(); - } else if (cand->second.cmp(v)) { -- format_to(std::back_inserter(out), "{}attr value mismatch '{}'", sep(error), k); -+ fmt::format_to(std::back_inserter(out), "{}attr value mismatch '{}'", sep(error), k); - obj_result.set_attr_value_mismatch(); - } - } -@@ -1356,7 +1356,7 @@ - - auto in_auth = auth.attrs.find(k); - if (in_auth == auth.attrs.end()) { -- format_to(std::back_inserter(out), "{}attr name mismatch '{}'", sep(error), k); -+ fmt::format_to(std::back_inserter(out), "{}attr name mismatch '{}'", sep(error), k); - obj_result.set_attr_name_mismatch(); - } - } -@@ -1823,8 +1823,7 @@ - SnapMapReaderI& snaps_getter) - { - using result_t = Scrub::SnapMapReaderI::result_t; -- dout(15) << fmt::format("{}: obj:{} snapset:{}", __func__, hoid, snapset) -- << dendl; -+ // dout(15) << fmt::format("{}: obj:{} snapset:{}", __func__, hoid, snapset) << dendl; - - auto p = snapset.clone_snaps.find(hoid.snap); - if (p == snapset.clone_snaps.end()) { diff --git a/0027-src-kv-rocksdb_cache-ShardedCache.h.patch b/0027-src-kv-rocksdb_cache-ShardedCache.h.patch deleted file mode 100644 index 347624e..0000000 --- a/0027-src-kv-rocksdb_cache-ShardedCache.h.patch +++ /dev/null @@ -1,151 +0,0 @@ ---- ceph-17.2.6/src/kv/rocksdb_cache/ShardedCache.h.orig 2023-04-05 11:09:51.000000000 -0400 -+++ ceph-17.2.6/src/kv/rocksdb_cache/ShardedCache.h 2023-04-21 16:22:26.665067333 -0400 -@@ -15,7 +15,7 @@ - #include - - #include "rocksdb/version.h" --#include "rocksdb/cache.h" -+#include "rocksdb/advanced_cache.h" - #include "include/ceph_hash.h" - #include "common/PriorityCache.h" - //#include "hash.h" -@@ -26,7 +26,8 @@ - - namespace rocksdb_cache { - --using DeleterFn = void (*)(const rocksdb::Slice& key, void* value); -+// using DeleterFn = void (*)(const rocksdb::Slice& key, void* value); -+using DeleterFn = void (*)(rocksdb::Cache::ObjectPtr obj, rocksdb::MemoryAllocator* allocator); - - // Single cache shard interface. - class CacheShard { -@@ -34,11 +35,19 @@ - CacheShard() = default; - virtual ~CacheShard() = default; - -- virtual rocksdb::Status Insert(const rocksdb::Slice& key, uint32_t hash, void* value, -- size_t charge, -- DeleterFn deleter, -- rocksdb::Cache::Handle** handle, rocksdb::Cache::Priority priority) = 0; -- virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, uint32_t hash) = 0; -+ virtual rocksdb::Status Insert(const rocksdb::Slice& key, -+ rockdb::ObjectPtr obj, -+ const rocksdb::CacheItemHelper* helper, -+ size_t charge, -+ rocksdb:Handle** handle = nullptr, -+ Rocksdb::Priority priority = Rocksdb::Priority::LOW) -+ virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, -+ const rocksdb::CacheItemHelper* helper = nullptr, -+ rocksdb::CreateContext* create_context = nullptr, -+ rocksdb::Priority priority = rocksdb::Priority::LOW, -+ bool wait = true, -+ rocksdb::Statistics* stats = nullptr); -+ - virtual bool Ref(rocksdb::Cache::Handle* handle) = 0; - virtual bool Release(rocksdb::Cache::Handle* handle, bool force_erase = false) = 0; - virtual void Erase(const rocksdb::Slice& key, uint32_t hash) = 0; -@@ -68,8 +77,8 @@ - virtual const char* Name() const override = 0; - virtual rocksdb::Status Insert(const rocksdb::Slice& key, void* value, size_t charge, - DeleterFn, -- rocksdb::Cache::Handle** handle, Priority priority) override; -- virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, rocksdb::Statistics* stats) override; -+ rocksdb::Cache::Handle** handle, Priority priority); -+ virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, rocksdb::Statistics* stats); - virtual bool Ref(rocksdb::Cache::Handle* handle) override; - virtual bool Release(rocksdb::Cache::Handle* handle, bool force_erase = false) override; - virtual void* Value(Handle* handle) override = 0; -@@ -84,14 +93,17 @@ - virtual size_t GetPinnedUsage() const override; - virtual size_t GetCharge(Handle* handle) const = 0; - #if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) -- virtual DeleterFn GetDeleter(Handle* handle) const override; -+ virtual DeleterFn GetDeleter(Handle* handle) const; - #endif - virtual void DisownData() override = 0; - #if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) -+ virtual const rocksdb::CacheItemHelper* GetCacheItemHelper(rocksdb::Cache::Handle* handle) const; - virtual void ApplyToAllEntries( -- const std::function& callback, -- const ApplyToAllEntriesOptions& opts) override; -+ const std::function& callback, -+ const rocksdb::ApplyToAllEntriesOptions& opts); - #else - virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t), - bool thread_safe) override; ---- ceph-17.2.6/src/kv/RocksDBStore.cc.orig 2023-04-05 11:09:51.000000000 -0400 -+++ ceph-17.2.6/src/kv/RocksDBStore.cc 2023-04-20 16:19:29.280669881 -0400 -@@ -903,6 +903,19 @@ - // base_name - name of column without shard suffix: "-"+number - // options - additional options to apply - // cf_opt - column family options to update -+ -+rocksdb::Status GetColumnFamilyOptionsFromMap( -+ const rocksdb::ColumnFamilyOptions& base_options, -+ const std::unordered_map& opts_map, -+ rocksdb::ColumnFamilyOptions* new_options, bool input_strings_escaped, -+ bool ignore_unknown_options) { -+ rocksdb::ConfigOptions config_options; -+ config_options.ignore_unknown_options = ignore_unknown_options; -+ config_options.input_strings_escaped = input_strings_escaped; -+ return rocksdb::GetColumnFamilyOptionsFromMap(config_options, base_options, opts_map, -+ new_options); -+} -+ - int RocksDBStore::update_column_family_options(const std::string& base_name, - const std::string& more_options, - rocksdb::ColumnFamilyOptions* cf_opt) -@@ -916,7 +929,7 @@ - << " options=" << more_options << dendl; - return r; - } -- status = rocksdb::GetColumnFamilyOptionsFromMap(*cf_opt, options_map, cf_opt); -+ status = GetColumnFamilyOptionsFromMap(*cf_opt, options_map, cf_opt, false, false); - if (!status.ok()) { - dout(5) << __func__ << " invalid column family optionsp; column family=" - << base_name << " options=" << more_options << dendl; -@@ -937,6 +950,20 @@ - return 0; - } - -+rocksdb::Status GetBlockBasedTableOptionsFromMap( -+ const rocksdb::BlockBasedTableOptions& table_options, -+ const std::unordered_map& opts_map, -+ rocksdb::BlockBasedTableOptions* new_table_options, bool input_strings_escaped, -+ bool ignore_unknown_options) { -+ rocksdb::ConfigOptions config_options; -+ config_options.input_strings_escaped = input_strings_escaped; -+ config_options.ignore_unknown_options = ignore_unknown_options; -+ config_options.invoke_prepare_options = false; -+ -+ return rocksdb::GetBlockBasedTableOptionsFromMap(config_options, table_options, -+ opts_map, new_table_options); -+} -+ - int RocksDBStore::apply_block_cache_options(const std::string& column_name, - const std::string& block_cache_opt, - rocksdb::ColumnFamilyOptions* cf_opt) -@@ -981,7 +1008,7 @@ - } - - rocksdb::BlockBasedTableOptions column_bbt_opts; -- status = GetBlockBasedTableOptionsFromMap(bbt_opts, cache_options_map, &column_bbt_opts); -+ status = GetBlockBasedTableOptionsFromMap(bbt_opts, cache_options_map, &column_bbt_opts, false, false); - if (!status.ok()) { - dout(5) << __func__ << " invalid block cache options; column=" << column_name - << " options=" << block_cache_opt << dendl; ---- ceph-17.2.6/src/kv/rocksdb_cache/BinnedLRUCache.h.orig 2023-04-21 10:11:00.180387609 -0400 -+++ ceph-17.2.6/src/kv/rocksdb_cache/BinnedLRUCache.h 2023-04-21 10:17:15.527816193 -0400 -@@ -121,7 +121,7 @@ - void Free() { - ceph_assert((refs == 1 && InCache()) || (refs == 0 && !InCache())); - if (deleter) { -- (*deleter)(key(), value); -+ (*deleter)(this, nullptr); - } - delete[] key_data; - delete this; diff --git a/0030-src-rgw-rgw_asio_client.cc.patch b/0030-src-rgw-rgw_asio_client.cc.patch deleted file mode 100644 index bcb5fcc..0000000 --- a/0030-src-rgw-rgw_asio_client.cc.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- ceph-18.0.0-2726-g7cea3740/src/rgw/rgw_asio_client.cc.orig 2023-03-14 18:46:02.037195570 -0400 -+++ ceph-18.0.0-2726-g7cea3740/src/rgw/rgw_asio_client.cc 2023-03-14 18:55:14.446438244 -0400 -@@ -39,11 +39,13 @@ - const auto& value = header->value(); - - if (field == beast::http::field::content_length) { -- env.set("CONTENT_LENGTH", value.to_string()); -+ std::string scratch{value.data(), value.size()}; -+ env.set("CONTENT_LENGTH", scratch.c_str()); - continue; - } - if (field == beast::http::field::content_type) { -- env.set("CONTENT_TYPE", value.to_string()); -+ std::string scratch{value.data(), value.size()}; -+ env.set("CONTENT_TYPE", scratch.c_str()); - continue; - } - -@@ -62,26 +64,37 @@ - } - *dest = '\0'; - -- env.set(buf, value.to_string()); -+ std::string scratch{value.data(), value.size()}; -+ env.set(buf, scratch.c_str()); - } - - int major = request.version() / 10; - int minor = request.version() % 10; - env.set("HTTP_VERSION", std::to_string(major) + '.' + std::to_string(minor)); - -- env.set("REQUEST_METHOD", request.method_string().to_string()); -+ { -+ std::string scratch {request.method_string().data(),request.method_string().size()}; -+ env.set("REQUEST_METHOD", scratch.c_str()); -+ } - - // split uri from query - auto uri = request.target(); - auto pos = uri.find('?'); - if (pos != uri.npos) { - auto query = uri.substr(pos + 1); -- env.set("QUERY_STRING", query.to_string()); -+ std::string scratch{query.data(), query.size()}; -+ env.set("QUERY_STRING", scratch.c_str()); - uri = uri.substr(0, pos); - } -- env.set("SCRIPT_URI", uri.to_string()); -+ { -+ std::string scratch {uri.data(), uri.size()}; -+ env.set("SCRIPT_URI", scratch.c_str()); -+ } - -- env.set("REQUEST_URI", request.target().to_string()); -+ { -+ std::string scratch {request.target().data(), request.target().size()}; -+ env.set("REQUEST_URI", scratch.c_str()); -+ } - - char port_buf[16]; - snprintf(port_buf, sizeof(port_buf), "%d", local_endpoint.port()); diff --git a/0036-18.2.1.release.patch b/0036-18.2.1.release.patch deleted file mode 100644 index e51e3fe..0000000 --- a/0036-18.2.1.release.patch +++ /dev/null @@ -1,986 +0,0 @@ -diff -ur ceph-18.2.1~/debian/changelog ceph-18.2.1/debian/changelog ---- ceph-18.2.1~/debian/changelog 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/debian/changelog 2023-12-11 16:55:38.000000000 -0500 -@@ -2,7 +2,7 @@ - - * New upstream release - -- -- Ceph Release Team Tue, 14 Nov 2023 19:36:16 +0000 -+ -- Ceph Release Team Mon, 11 Dec 2023 21:55:36 +0000 - - ceph (18.2.0-1) stable; urgency=medium - -diff -ur ceph-18.2.1~/doc/architecture.rst ceph-18.2.1/doc/architecture.rst ---- ceph-18.2.1~/doc/architecture.rst 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/doc/architecture.rst 2023-12-11 16:55:38.000000000 -0500 -@@ -30,6 +30,8 @@ - - :term:`Ceph Manager` - - :term:`Ceph Metadata Server` - -+.. _arch_monitor: -+ - Ceph Monitors maintain the master copy of the cluster map, which they provide - to Ceph clients. Provisioning multiple monitors within the Ceph cluster ensures - availability in the event that one of the monitor daemons or its host fails. -diff -ur ceph-18.2.1~/doc/glossary.rst ceph-18.2.1/doc/glossary.rst ---- ceph-18.2.1~/doc/glossary.rst 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/doc/glossary.rst 2023-12-11 16:55:38.000000000 -0500 -@@ -271,7 +271,7 @@ - The Ceph manager software, which collects all the state from - the whole cluster in one place. - -- MON -+ :ref:`MON` - The Ceph monitor software. - - Node -@@ -337,6 +337,12 @@ - Firefly (v. 0.80). See :ref:`Primary Affinity - `. - -+ Quorum -+ Quorum is the state that exists when a majority of the -+ :ref:`Monitors` in the cluster are ``up``. A -+ minimum of three :ref:`Monitors` must exist in -+ the cluster in order for Quorum to be possible. -+ - RADOS - **R**\eliable **A**\utonomic **D**\istributed **O**\bject - **S**\tore. RADOS is the object store that provides a scalable -diff -ur ceph-18.2.1~/doc/rados/troubleshooting/troubleshooting-mon.rst ceph-18.2.1/doc/rados/troubleshooting/troubleshooting-mon.rst ---- ceph-18.2.1~/doc/rados/troubleshooting/troubleshooting-mon.rst 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/doc/rados/troubleshooting/troubleshooting-mon.rst 2023-12-11 16:55:38.000000000 -0500 -@@ -17,59 +17,66 @@ - Initial Troubleshooting - ======================= - --#. **Make sure that the monitors are running.** -+The first steps in the process of troubleshooting Ceph Monitors involve making -+sure that the Monitors are running and that they are able to communicate with -+the network and on the network. Follow the steps in this section to rule out -+the simplest causes of Monitor malfunction. -+ -+#. **Make sure that the Monitors are running.** -+ -+ Make sure that the Monitor (*mon*) daemon processes (``ceph-mon``) are -+ running. It might be the case that the mons have not be restarted after an -+ upgrade. Checking for this simple oversight can save hours of painstaking -+ troubleshooting. -+ -+ It is also important to make sure that the manager daemons (``ceph-mgr``) -+ are running. Remember that typical cluster configurations provide one -+ Manager (``ceph-mgr``) for each Monitor (``ceph-mon``). - -- First, make sure that the monitor (*mon*) daemon processes (``ceph-mon``) -- are running. Sometimes Ceph admins either forget to start the mons or -- forget to restart the mons after an upgrade. Checking for this simple -- oversight can save hours of painstaking troubleshooting. It is also -- important to make sure that the manager daemons (``ceph-mgr``) are running. -- Remember that typical cluster configurations provide one ``ceph-mgr`` for -- each ``ceph-mon``. -+ .. note:: In releases prior to v1.12.5, Rook will not run more than two -+ managers. - -- .. note:: Rook will not run more than two managers. -+#. **Make sure that you can reach the Monitor nodes.** - --#. **Make sure that you can reach the monitor nodes.** -- -- In certain rare cases, there may be ``iptables`` rules that block access to -- monitor nodes or TCP ports. These rules might be left over from earlier -+ In certain rare cases, ``iptables`` rules might be blocking access to -+ Monitor nodes or TCP ports. These rules might be left over from earlier - stress testing or rule development. To check for the presence of such -- rules, SSH into the server and then try to connect to the monitor's ports -- (``tcp/3300`` and ``tcp/6789``) using ``telnet``, ``nc``, or a similar -- tool. -- --#. **Make sure that the ``ceph status`` command runs and receives a reply from the cluster.** -- -- If the ``ceph status`` command does receive a reply from the cluster, then -- the cluster is up and running. The monitors will answer to a ``status`` -- request only if there is a formed quorum. Confirm that one or more ``mgr`` -- daemons are reported as running. Under ideal conditions, all ``mgr`` -- daemons will be reported as running. -- -+ rules, SSH into each Monitor node and use ``telnet`` or ``nc`` or a similar -+ tool to attempt to connect to each of the other Monitor nodes on ports -+ ``tcp/3300`` and ``tcp/6789``. -+ -+#. **Make sure that the "ceph status" command runs and receives a reply from the cluster.** -+ -+ If the ``ceph status`` command receives a reply from the cluster, then the -+ cluster is up and running. Monitors answer to a ``status`` request only if -+ there is a formed quorum. Confirm that one or more ``mgr`` daemons are -+ reported as running. In a cluster with no deficiencies, ``ceph status`` -+ will report that all ``mgr`` daemons are running. - - If the ``ceph status`` command does not receive a reply from the cluster, -- then there are probably not enough monitors ``up`` to form a quorum. The -- ``ceph -s`` command with no further options specified connects to an -- arbitrarily selected monitor. In certain cases, however, it might be -- helpful to connect to a specific monitor (or to several specific monitors -+ then there are probably not enough Monitors ``up`` to form a quorum. If the -+ ``ceph -s`` command is run with no further options specified, it connects -+ to an arbitrarily selected Monitor. In certain cases, however, it might be -+ helpful to connect to a specific Monitor (or to several specific Monitors - in sequence) by adding the ``-m`` flag to the command: for example, ``ceph - status -m mymon1``. - - #. **None of this worked. What now?** - - If the above solutions have not resolved your problems, you might find it -- helpful to examine each individual monitor in turn. Whether or not a quorum -- has been formed, it is possible to contact each monitor individually and -+ helpful to examine each individual Monitor in turn. Even if no quorum has -+ been formed, it is possible to contact each Monitor individually and - request its status by using the ``ceph tell mon.ID mon_status`` command -- (here ``ID`` is the monitor's identifier). -+ (here ``ID`` is the Monitor's identifier). - -- Run the ``ceph tell mon.ID mon_status`` command for each monitor in the -+ Run the ``ceph tell mon.ID mon_status`` command for each Monitor in the - cluster. For more on this command's output, see :ref:`Understanding - mon_status - `. - -- There is also an alternative method: SSH into each monitor node and query -- the daemon's admin socket. See :ref:`Using the Monitor's Admin -+ There is also an alternative method for contacting each individual Monitor: -+ SSH into each Monitor node and query the daemon's admin socket. See -+ :ref:`Using the Monitor's Admin - Socket`. - - .. _rados_troubleshoting_troubleshooting_mon_using_admin_socket: -diff -ur ceph-18.2.1~/qa/tasks/cephfs/kernel_mount.py ceph-18.2.1/qa/tasks/cephfs/kernel_mount.py ---- ceph-18.2.1~/qa/tasks/cephfs/kernel_mount.py 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/qa/tasks/cephfs/kernel_mount.py 2023-12-11 16:55:38.000000000 -0500 -@@ -68,7 +68,10 @@ - self.enable_dynamic_debug() - self.ctx[f'kmount_count.{self.client_remote.hostname}'] = kmount_count + 1 - -- self.gather_mount_info() -+ try: -+ self.gather_mount_info() -+ except: -+ log.warn('failed to fetch mount info - tests depending on mount addr/inst may fail!') - - def gather_mount_info(self): - self.id = self._get_global_id() -diff -ur ceph-18.2.1~/qa/tasks/cephfs/mount.py ceph-18.2.1/qa/tasks/cephfs/mount.py ---- ceph-18.2.1~/qa/tasks/cephfs/mount.py 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/qa/tasks/cephfs/mount.py 2023-12-11 16:55:38.000000000 -0500 -@@ -186,6 +186,12 @@ - sudo=True).decode()) - - def is_blocked(self): -+ if not self.addr: -+ # can't infer if our addr is blocklisted - let the caller try to -+ # umount without lazy/force. If the client was blocklisted, then -+ # the umount would be stuck and the test would fail on timeout. -+ # happens only with Ubuntu 20.04 (missing kclient patches :/). -+ return False - self.fs = Filesystem(self.ctx, name=self.cephfs_name) - - try: -diff -ur ceph-18.2.1~/src/ceph-volume/ceph_volume/devices/raw/list.py ceph-18.2.1/src/ceph-volume/ceph_volume/devices/raw/list.py ---- ceph-18.2.1~/src/ceph-volume/ceph_volume/devices/raw/list.py 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/ceph-volume/ceph_volume/devices/raw/list.py 2023-12-11 16:55:38.000000000 -0500 -@@ -5,7 +5,7 @@ - from textwrap import dedent - from ceph_volume import decorators, process - from ceph_volume.util import disk -- -+from typing import Any, Dict, List - - logger = logging.getLogger(__name__) - -@@ -66,50 +66,57 @@ - def __init__(self, argv): - self.argv = argv - -+ def is_atari_partitions(self, _lsblk: Dict[str, Any]) -> bool: -+ dev = _lsblk['NAME'] -+ if _lsblk.get('PKNAME'): -+ parent = _lsblk['PKNAME'] -+ try: -+ if disk.has_bluestore_label(parent): -+ logger.warning(('ignoring child device {} whose parent {} is a BlueStore OSD.'.format(dev, parent), -+ 'device is likely a phantom Atari partition. device info: {}'.format(_lsblk))) -+ return True -+ except OSError as e: -+ logger.error(('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.'.format(dev), -+ 'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e))) -+ return True -+ return False -+ -+ def exclude_atari_partitions(self, _lsblk_all: Dict[str, Any]) -> List[Dict[str, Any]]: -+ return [_lsblk for _lsblk in _lsblk_all if not self.is_atari_partitions(_lsblk)] -+ - def generate(self, devs=None): - logger.debug('Listing block devices via lsblk...') -- info_devices = disk.lsblk_all(abspath=True) -+ info_devices = [] - if not devs or not any(devs): - # If no devs are given initially, we want to list ALL devices including children and - # parents. Parent disks with child partitions may be the appropriate device to return if - # the parent disk has a bluestore header, but children may be the most appropriate - # devices to return if the parent disk does not have a bluestore header. -+ info_devices = disk.lsblk_all(abspath=True) - devs = [device['NAME'] for device in info_devices if device.get('NAME',)] -+ else: -+ for dev in devs: -+ info_devices.append(disk.lsblk(dev, abspath=True)) -+ -+ # Linux kernels built with CONFIG_ATARI_PARTITION enabled can falsely interpret -+ # bluestore's on-disk format as an Atari partition table. These false Atari partitions -+ # can be interpreted as real OSDs if a bluestore OSD was previously created on the false -+ # partition. See https://tracker.ceph.com/issues/52060 for more info. If a device has a -+ # parent, it is a child. If the parent is a valid bluestore OSD, the child will only -+ # exist if it is a phantom Atari partition, and the child should be ignored. If the -+ # parent isn't bluestore, then the child could be a valid bluestore OSD. If we fail to -+ # determine whether a parent is bluestore, we should err on the side of not reporting -+ # the child so as not to give a false negative. -+ info_devices = self.exclude_atari_partitions(info_devices) - - result = {} - logger.debug('inspecting devices: {}'.format(devs)) -- for dev in devs: -- # Linux kernels built with CONFIG_ATARI_PARTITION enabled can falsely interpret -- # bluestore's on-disk format as an Atari partition table. These false Atari partitions -- # can be interpreted as real OSDs if a bluestore OSD was previously created on the false -- # partition. See https://tracker.ceph.com/issues/52060 for more info. If a device has a -- # parent, it is a child. If the parent is a valid bluestore OSD, the child will only -- # exist if it is a phantom Atari partition, and the child should be ignored. If the -- # parent isn't bluestore, then the child could be a valid bluestore OSD. If we fail to -- # determine whether a parent is bluestore, we should err on the side of not reporting -- # the child so as not to give a false negative. -- matched_info_devices = [info for info in info_devices if info['NAME'] == dev] -- if not matched_info_devices: -- logger.warning('device {} does not exist'.format(dev)) -- continue -- info_device = matched_info_devices[0] -- if 'PKNAME' in info_device and info_device['PKNAME'] != "": -- parent = info_device['PKNAME'] -- try: -- if disk.has_bluestore_label(parent): -- logger.warning(('ignoring child device {} whose parent {} is a BlueStore OSD.'.format(dev, parent), -- 'device is likely a phantom Atari partition. device info: {}'.format(info_device))) -- continue -- except OSError as e: -- logger.error(('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.'.format(dev), -- 'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e))) -- continue -- -- bs_info = _get_bluestore_info(dev) -+ for info_device in info_devices: -+ bs_info = _get_bluestore_info(info_device['NAME']) - if bs_info is None: - # None is also returned in the rare event that there is an issue reading info from - # a BlueStore disk, so be sure to log our assumption that it isn't bluestore -- logger.info('device {} does not have BlueStore information'.format(dev)) -+ logger.info('device {} does not have BlueStore information'.format(info_device['NAME'])) - continue - uuid = bs_info['osd_uuid'] - if uuid not in result: -diff -ur ceph-18.2.1~/src/ceph-volume/ceph_volume/tests/util/test_disk.py ceph-18.2.1/src/ceph-volume/ceph_volume/tests/util/test_disk.py ---- ceph-18.2.1~/src/ceph-volume/ceph_volume/tests/util/test_disk.py 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/ceph-volume/ceph_volume/tests/util/test_disk.py 2023-12-11 16:55:38.000000000 -0500 -@@ -1,7 +1,37 @@ - import os - import pytest - from ceph_volume.util import disk --from mock.mock import patch -+from mock.mock import patch, MagicMock -+ -+ -+class TestFunctions: -+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=False)) -+ def test_is_device_path_does_not_exist(self): -+ assert not disk.is_device('/dev/foo') -+ -+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True)) -+ def test_is_device_dev_doesnt_startswith_dev(self): -+ assert not disk.is_device('/foo') -+ -+ @patch('ceph_volume.util.disk.allow_loop_devices', MagicMock(return_value=False)) -+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True)) -+ def test_is_device_loop_not_allowed(self): -+ assert not disk.is_device('/dev/loop123') -+ -+ @patch('ceph_volume.util.disk.lsblk', MagicMock(return_value={'NAME': 'foo', 'TYPE': 'disk'})) -+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True)) -+ def test_is_device_type_disk(self): -+ assert disk.is_device('/dev/foo') -+ -+ @patch('ceph_volume.util.disk.lsblk', MagicMock(return_value={'NAME': 'foo', 'TYPE': 'mpath'})) -+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True)) -+ def test_is_device_type_mpath(self): -+ assert disk.is_device('/dev/foo') -+ -+ @patch('ceph_volume.util.disk.lsblk', MagicMock(return_value={'NAME': 'foo1', 'TYPE': 'part'})) -+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True)) -+ def test_is_device_type_part(self): -+ assert not disk.is_device('/dev/foo1') - - - class TestLsblkParser(object): -diff -ur ceph-18.2.1~/src/ceph-volume/ceph_volume/util/disk.py ceph-18.2.1/src/ceph-volume/ceph_volume/util/disk.py ---- ceph-18.2.1~/src/ceph-volume/ceph_volume/util/disk.py 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/ceph-volume/ceph_volume/util/disk.py 2023-12-11 16:55:38.000000000 -0500 -@@ -359,6 +359,10 @@ - if not allow_loop_devices(): - return False - -+ TYPE = lsblk(dev).get('TYPE') -+ if TYPE: -+ return TYPE in ['disk', 'mpath'] -+ - # fallback to stat - return _stat_is_device(os.lstat(dev).st_mode) - -diff -ur ceph-18.2.1~/src/.git_version ceph-18.2.1/src/.git_version ---- ceph-18.2.1~/src/.git_version 2023-11-14 14:37:51.000000000 -0500 -+++ ceph-18.2.1/src/.git_version 2023-12-11 16:57:17.000000000 -0500 -@@ -1,2 +1,2 @@ --e3fce6809130d78ac0058fc87e537ecd926cd213 -+7fe91d5d5842e04be3b4f514d6dd990c54b29c76 - 18.2.1 -diff -ur ceph-18.2.1~/src/messages/MClientRequest.h ceph-18.2.1/src/messages/MClientRequest.h ---- ceph-18.2.1~/src/messages/MClientRequest.h 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/messages/MClientRequest.h 2023-12-11 16:55:38.000000000 -0500 -@@ -234,6 +234,12 @@ - copy_from_legacy_head(&head, &old_mds_head); - head.version = 0; - -+ head.ext_num_retry = head.num_retry; -+ head.ext_num_fwd = head.num_fwd; -+ -+ head.owner_uid = head.caller_uid; -+ head.owner_gid = head.caller_gid; -+ - /* Can't set the btime from legacy struct */ - if (head.op == CEPH_MDS_OP_SETATTR) { - int localmask = head.args.setattr.mask; -diff -ur ceph-18.2.1~/src/os/bluestore/AvlAllocator.cc ceph-18.2.1/src/os/bluestore/AvlAllocator.cc ---- ceph-18.2.1~/src/os/bluestore/AvlAllocator.cc 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/os/bluestore/AvlAllocator.cc 2023-12-11 16:55:38.000000000 -0500 -@@ -39,7 +39,7 @@ - uint64_t search_bytes = 0; - auto rs_start = range_tree.lower_bound(range_t{*cursor, size}, compare); - for (auto rs = rs_start; rs != range_tree.end(); ++rs) { -- uint64_t offset = p2roundup(rs->start, align); -+ uint64_t offset = rs->start; - *cursor = offset + size; - if (offset + size <= rs->end) { - return offset; -@@ -59,7 +59,7 @@ - } - // If we reached end, start from beginning till cursor. - for (auto rs = range_tree.begin(); rs != rs_start; ++rs) { -- uint64_t offset = p2roundup(rs->start, align); -+ uint64_t offset = rs->start; - *cursor = offset + size; - if (offset + size <= rs->end) { - return offset; -@@ -82,7 +82,7 @@ - const auto compare = range_size_tree.key_comp(); - auto rs_start = range_size_tree.lower_bound(range_t{0, size}, compare); - for (auto rs = rs_start; rs != range_size_tree.end(); ++rs) { -- uint64_t offset = p2roundup(rs->start, align); -+ uint64_t offset = rs->start; - if (offset + size <= rs->end) { - return offset; - } -diff -ur ceph-18.2.1~/src/os/bluestore/BlueFS.cc ceph-18.2.1/src/os/bluestore/BlueFS.cc ---- ceph-18.2.1~/src/os/bluestore/BlueFS.cc 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/os/bluestore/BlueFS.cc 2023-12-11 16:55:38.000000000 -0500 -@@ -658,16 +658,24 @@ - } - logger->set(l_bluefs_wal_alloc_unit, wal_alloc_size); - -+ -+ uint64_t shared_alloc_size = cct->_conf->bluefs_shared_alloc_size; -+ if (shared_alloc && shared_alloc->a) { -+ uint64_t unit = shared_alloc->a->get_block_size(); -+ shared_alloc_size = std::max( -+ unit, -+ shared_alloc_size); -+ ceph_assert(0 == p2phase(shared_alloc_size, unit)); -+ } - if (bdev[BDEV_SLOW]) { - alloc_size[BDEV_DB] = cct->_conf->bluefs_alloc_size; -- alloc_size[BDEV_SLOW] = cct->_conf->bluefs_shared_alloc_size; -- logger->set(l_bluefs_db_alloc_unit, cct->_conf->bluefs_alloc_size); -- logger->set(l_bluefs_main_alloc_unit, cct->_conf->bluefs_shared_alloc_size); -+ alloc_size[BDEV_SLOW] = shared_alloc_size; - } else { -- alloc_size[BDEV_DB] = cct->_conf->bluefs_shared_alloc_size; -- logger->set(l_bluefs_main_alloc_unit, 0); -- logger->set(l_bluefs_db_alloc_unit, cct->_conf->bluefs_shared_alloc_size); -+ alloc_size[BDEV_DB] = shared_alloc_size; -+ alloc_size[BDEV_SLOW] = 0; - } -+ logger->set(l_bluefs_db_alloc_unit, alloc_size[BDEV_DB]); -+ logger->set(l_bluefs_main_alloc_unit, alloc_size[BDEV_SLOW]); - // new wal and db devices are never shared - if (bdev[BDEV_NEWWAL]) { - alloc_size[BDEV_NEWWAL] = cct->_conf->bluefs_alloc_size; -@@ -681,13 +689,13 @@ - continue; - } - ceph_assert(bdev[id]->get_size()); -- ceph_assert(alloc_size[id]); - if (is_shared_alloc(id)) { - dout(1) << __func__ << " shared, id " << id << std::hex - << ", capacity 0x" << bdev[id]->get_size() - << ", block size 0x" << alloc_size[id] - << std::dec << dendl; - } else { -+ ceph_assert(alloc_size[id]); - std::string name = "bluefs-"; - const char* devnames[] = { "wal","db","slow" }; - if (id <= BDEV_SLOW) -diff -ur ceph-18.2.1~/src/os/bluestore/BtreeAllocator.cc ceph-18.2.1/src/os/bluestore/BtreeAllocator.cc ---- ceph-18.2.1~/src/os/bluestore/BtreeAllocator.cc 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/os/bluestore/BtreeAllocator.cc 2023-12-11 16:55:38.000000000 -0500 -@@ -25,7 +25,7 @@ - { - auto rs_start = range_tree.lower_bound(*cursor); - for (auto rs = rs_start; rs != range_tree.end(); ++rs) { -- uint64_t offset = p2roundup(rs->first, align); -+ uint64_t offset = rs->first; - if (offset + size <= rs->second) { - *cursor = offset + size; - return offset; -@@ -37,7 +37,7 @@ - } - // If we reached end, start from beginning till cursor. - for (auto rs = range_tree.begin(); rs != rs_start; ++rs) { -- uint64_t offset = p2roundup(rs->first, align); -+ uint64_t offset = rs->first; - if (offset + size <= rs->second) { - *cursor = offset + size; - return offset; -@@ -53,7 +53,7 @@ - // the needs - auto rs_start = range_size_tree.lower_bound(range_value_t{0,size}); - for (auto rs = rs_start; rs != range_size_tree.end(); ++rs) { -- uint64_t offset = p2roundup(rs->start, align); -+ uint64_t offset = rs->start; - if (offset + size <= rs->start + rs->size) { - return offset; - } -diff -ur ceph-18.2.1~/src/os/bluestore/fastbmap_allocator_impl.cc ceph-18.2.1/src/os/bluestore/fastbmap_allocator_impl.cc ---- ceph-18.2.1~/src/os/bluestore/fastbmap_allocator_impl.cc 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/os/bluestore/fastbmap_allocator_impl.cc 2023-12-11 16:55:38.000000000 -0500 -@@ -17,19 +17,9 @@ - - inline interval_t _align2units(uint64_t offset, uint64_t len, uint64_t min_length) - { -- interval_t res; -- if (len >= min_length) { -- res.offset = p2roundup(offset, min_length); -- auto delta_off = res.offset - offset; -- if (len > delta_off) { -- res.length = len - delta_off; -- res.length = p2align(res.length, min_length); -- if (res.length) { -- return res; -- } -- } -- } -- return interval_t(); -+ return len >= min_length ? -+ interval_t(offset, p2align(len, min_length)) : -+ interval_t(); - } - - interval_t AllocatorLevel01Loose::_get_longest_from_l0(uint64_t pos0, -diff -ur ceph-18.2.1~/src/os/bluestore/StupidAllocator.cc ceph-18.2.1/src/os/bluestore/StupidAllocator.cc ---- ceph-18.2.1~/src/os/bluestore/StupidAllocator.cc 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/os/bluestore/StupidAllocator.cc 2023-12-11 16:55:38.000000000 -0500 -@@ -52,20 +52,6 @@ - } - } - --/// return the effective length of the extent if we align to alloc_unit --uint64_t StupidAllocator::_aligned_len( -- StupidAllocator::interval_set_t::iterator p, -- uint64_t alloc_unit) --{ -- uint64_t skew = p.get_start() % alloc_unit; -- if (skew) -- skew = alloc_unit - skew; -- if (skew > p.get_len()) -- return 0; -- else -- return p.get_len() - skew; --} -- - int64_t StupidAllocator::allocate_int( - uint64_t want_size, uint64_t alloc_unit, int64_t hint, - uint64_t *offset, uint32_t *length) -@@ -89,7 +75,7 @@ - for (bin = orig_bin; bin < (int)free.size(); ++bin) { - p = free[bin].lower_bound(hint); - while (p != free[bin].end()) { -- if (_aligned_len(p, alloc_unit) >= want_size) { -+ if (p.get_len() >= want_size) { - goto found; - } - ++p; -@@ -102,7 +88,7 @@ - p = free[bin].begin(); - auto end = hint ? free[bin].lower_bound(hint) : free[bin].end(); - while (p != end) { -- if (_aligned_len(p, alloc_unit) >= want_size) { -+ if (p.get_len() >= want_size) { - goto found; - } - ++p; -@@ -114,7 +100,7 @@ - for (bin = orig_bin; bin >= 0; --bin) { - p = free[bin].lower_bound(hint); - while (p != free[bin].end()) { -- if (_aligned_len(p, alloc_unit) >= alloc_unit) { -+ if (p.get_len() >= alloc_unit) { - goto found; - } - ++p; -@@ -127,7 +113,7 @@ - p = free[bin].begin(); - auto end = hint ? free[bin].lower_bound(hint) : free[bin].end(); - while (p != end) { -- if (_aligned_len(p, alloc_unit) >= alloc_unit) { -+ if (p.get_len() >= alloc_unit) { - goto found; - } - ++p; -@@ -137,11 +123,9 @@ - return -ENOSPC; - - found: -- uint64_t skew = p.get_start() % alloc_unit; -- if (skew) -- skew = alloc_unit - skew; -- *offset = p.get_start() + skew; -- *length = std::min(std::max(alloc_unit, want_size), p2align((p.get_len() - skew), alloc_unit)); -+ *offset = p.get_start(); -+ *length = std::min(std::max(alloc_unit, want_size), p2align(p.get_len(), alloc_unit)); -+ - if (cct->_conf->bluestore_debug_small_allocations) { - uint64_t max = - alloc_unit * (rand() % cct->_conf->bluestore_debug_small_allocations); -@@ -158,7 +142,7 @@ - - free[bin].erase(*offset, *length); - uint64_t off, len; -- if (*offset && free[bin].contains(*offset - skew - 1, &off, &len)) { -+ if (*offset && free[bin].contains(*offset - 1, &off, &len)) { - int newbin = _choose_bin(len); - if (newbin != bin) { - ldout(cct, 30) << __func__ << " demoting 0x" << std::hex << off << "~" << len -diff -ur ceph-18.2.1~/src/os/bluestore/StupidAllocator.h ceph-18.2.1/src/os/bluestore/StupidAllocator.h ---- ceph-18.2.1~/src/os/bluestore/StupidAllocator.h 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/os/bluestore/StupidAllocator.h 2023-12-11 16:55:38.000000000 -0500 -@@ -31,10 +31,6 @@ - unsigned _choose_bin(uint64_t len); - void _insert_free(uint64_t offset, uint64_t len); - -- uint64_t _aligned_len( -- interval_set_t::iterator p, -- uint64_t alloc_unit); -- - public: - StupidAllocator(CephContext* cct, - int64_t size, -diff -ur ceph-18.2.1~/src/test/objectstore/Allocator_test.cc ceph-18.2.1/src/test/objectstore/Allocator_test.cc ---- ceph-18.2.1~/src/test/objectstore/Allocator_test.cc 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/test/objectstore/Allocator_test.cc 2023-12-11 16:55:38.000000000 -0500 -@@ -516,8 +516,7 @@ - PExtentVector extents; - auto need = 0x3f980000; - auto got = alloc->allocate(need, 0x10000, 0, (int64_t)0, &extents); -- EXPECT_GT(got, 0); -- EXPECT_EQ(got, 0x630000); -+ EXPECT_GE(got, 0x630000); - } - - TEST_P(AllocTest, test_alloc_50656_best_fit) -diff -ur ceph-18.2.1~/src/test/objectstore/fastbmap_allocator_test.cc ceph-18.2.1/src/test/objectstore/fastbmap_allocator_test.cc ---- ceph-18.2.1~/src/test/objectstore/fastbmap_allocator_test.cc 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/test/objectstore/fastbmap_allocator_test.cc 2023-12-11 16:55:38.000000000 -0500 -@@ -625,6 +625,8 @@ - ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - - { -+ // Original free space disposition (start chunk, count): -+ // - size_t to_release = 2 * _1m + 0x1000; - // release 2M + 4K at the beginning - interval_vector_t r; -@@ -637,6 +639,8 @@ - ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -+ // Original free space disposition (start chunk, count): -+ // <0, 513>, - // allocate 4K within the deallocated range - uint64_t allocated4 = 0; - interval_vector_t a4; -@@ -652,79 +656,91 @@ - ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -- // allocate 1M - should go to the second 1M chunk -+ // Original free space disposition (start chunk, count): -+ // <1, 512>, -+ // allocate 1M - should go to offset 4096 - uint64_t allocated4 = 0; - interval_vector_t a4; - al2.allocate_l2(_1m, _1m, &allocated4, &a4); - ASSERT_EQ(a4.size(), 1u); - ASSERT_EQ(allocated4, _1m); -- ASSERT_EQ(a4[0].offset, _1m); -+ ASSERT_EQ(a4[0].offset, 4096); - ASSERT_EQ(a4[0].length, _1m); - bins_overall.clear(); - al2.collect_stats(bins_overall); -- ASSERT_EQ(bins_overall.size(), 3u); -- ASSERT_EQ(bins_overall[0], 1u); -- ASSERT_EQ(bins_overall[cbits((_1m - 0x1000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall.size(), 2u); -+ ASSERT_EQ(bins_overall[cbits(_1m / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -+ // Original free space disposition (start chunk, count): -+ // <257, 256>, - // and allocate yet another 8K within the deallocated range - uint64_t allocated4 = 0; - interval_vector_t a4; - al2.allocate_l2(0x2000, 0x1000, &allocated4, &a4); - ASSERT_EQ(a4.size(), 1u); - ASSERT_EQ(allocated4, 0x2000u); -- ASSERT_EQ(a4[0].offset, 0x1000u); -+ ASSERT_EQ(a4[0].offset, _1m + 0x1000u); - ASSERT_EQ(a4[0].length, 0x2000u); - bins_overall.clear(); - al2.collect_stats(bins_overall); -- ASSERT_EQ(bins_overall[0], 1u); -- ASSERT_EQ(bins_overall[cbits((_1m - 0x3000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall.size(), 2u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -- // release just allocated 1M -+ // Original free space disposition (start chunk, count): -+ // <259, 254>, -+ // release 4K~1M - interval_vector_t r; -- r.emplace_back(_1m, _1m); -+ r.emplace_back(0x1000, _1m); - al2.free_l2(r); - bins_overall.clear(); - al2.collect_stats(bins_overall); -- ASSERT_EQ(bins_overall.size(), 2u); -- ASSERT_EQ(bins_overall[cbits((2 * _1m - 0x3000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall.size(), 3u); -+ //ASSERT_EQ(bins_overall[cbits((2 * _1m - 0x3000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits(_1m / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -- // allocate 3M - should go to the second 1M chunk and @capacity/2 -+ // Original free space disposition (start chunk, count): -+ // <1, 257>, <259, 254>, -+ // allocate 3M - should go to the first 1M chunk and @capacity/2 - uint64_t allocated4 = 0; - interval_vector_t a4; - al2.allocate_l2(3 * _1m, _1m, &allocated4, &a4); - ASSERT_EQ(a4.size(), 2u); - ASSERT_EQ(allocated4, 3 * _1m); -- ASSERT_EQ(a4[0].offset, _1m); -+ ASSERT_EQ(a4[0].offset, 0x1000); - ASSERT_EQ(a4[0].length, _1m); - ASSERT_EQ(a4[1].offset, capacity / 2); - ASSERT_EQ(a4[1].length, 2 * _1m); - bins_overall.clear(); - al2.collect_stats(bins_overall); -- ASSERT_EQ(bins_overall.size(), 3u); -- ASSERT_EQ(bins_overall[0], 1u); -- ASSERT_EQ(bins_overall[cbits((_1m - 0x3000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall.size(), 2u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits((num_chunks - 512) / 2) - 1], 1u); - } - { -- // release allocated 1M in the second meg chunk except -+ // Original free space disposition (start chunk, count): -+ // <259, 254>, -+ // release allocated 1M in the first meg chunk except - // the first 4K chunk - interval_vector_t r; -- r.emplace_back(_1m + 0x1000, _1m); -+ r.emplace_back(0x1000, _1m); - al2.free_l2(r); - bins_overall.clear(); - al2.collect_stats(bins_overall); - ASSERT_EQ(bins_overall.size(), 3u); - ASSERT_EQ(bins_overall[cbits(_1m / 0x1000) - 1], 1u); -- ASSERT_EQ(bins_overall[cbits((_1m - 0x3000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits((num_chunks - 512) / 2) - 1], 1u); - } - { -+ // Original free space disposition (start chunk, count): -+ // <1, 256>, <259, 254>, - // release 2M @(capacity / 2) - interval_vector_t r; - r.emplace_back(capacity / 2, 2 * _1m); -@@ -733,10 +749,12 @@ - al2.collect_stats(bins_overall); - ASSERT_EQ(bins_overall.size(), 3u); - ASSERT_EQ(bins_overall[cbits(_1m / 0x1000) - 1], 1u); -- ASSERT_EQ(bins_overall[cbits((_1m - 0x3000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits((num_chunks) / 2) - 1], 1u); - } - { -+ // Original free space disposition (start chunk, count): -+ // <1, 256>, <259, 254>, - // allocate 4x512K - should go to the second halves of - // the first and second 1M chunks and @(capacity / 2) - uint64_t allocated4 = 0; -@@ -744,51 +762,54 @@ - al2.allocate_l2(2 * _1m, _1m / 2, &allocated4, &a4); - ASSERT_EQ(a4.size(), 3u); - ASSERT_EQ(allocated4, 2 * _1m); -- ASSERT_EQ(a4[0].offset, _1m / 2); -+ ASSERT_EQ(a4[1].offset, 0x1000); -+ ASSERT_EQ(a4[1].length, _1m); -+ ASSERT_EQ(a4[0].offset, _1m + 0x3000); - ASSERT_EQ(a4[0].length, _1m / 2); -- ASSERT_EQ(a4[1].offset, _1m + _1m / 2); -- ASSERT_EQ(a4[1].length, _1m / 2); - ASSERT_EQ(a4[2].offset, capacity / 2); -- ASSERT_EQ(a4[2].length, _1m); -+ ASSERT_EQ(a4[2].length, _1m / 2); - - bins_overall.clear(); - al2.collect_stats(bins_overall); -- ASSERT_EQ(bins_overall.size(), 3u); -- ASSERT_EQ(bins_overall[0], 1u); -- // below we have 512K - 4K & 512K - 12K chunks which both fit into -- // the same bin = 6 -- ASSERT_EQ(bins_overall[6], 2u); -+ ASSERT_EQ(bins_overall.size(), 2u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000 - 0x80000) / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits((num_chunks - 256) / 2) - 1], 1u); - - } - { -- // cleanup first 2M except except the last 4K chunk -+ // Original free space disposition (start chunk, count): -+ // <387, 126>, -+ // cleanup first 1536K except the last 4K chunk - interval_vector_t r; -- r.emplace_back(0, 2 * _1m - 0x1000); -+ r.emplace_back(0, _1m + _1m / 2 - 0x1000); - al2.free_l2(r); - bins_overall.clear(); - al2.collect_stats(bins_overall); - - ASSERT_EQ(bins_overall.size(), 3u); -- ASSERT_EQ(bins_overall[0], 1u); -- ASSERT_EQ(bins_overall[cbits((_2m - 0x1000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits((_1m + _1m / 2 - 0x1000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000 - 0x80000) / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits((num_chunks - 256) / 2) - 1], 1u); - } - { -- // release 2M @(capacity / 2) -+ // Original free space disposition (start chunk, count): -+ // <0, 383> <387, 126>, -+ // release 512K @(capacity / 2) - interval_vector_t r; -- r.emplace_back(capacity / 2, 2 * _1m); -+ r.emplace_back(capacity / 2, _1m / 2); - al2.free_l2(r); - bins_overall.clear(); - al2.collect_stats(bins_overall); - - ASSERT_EQ(bins_overall.size(), 3u); -- ASSERT_EQ(bins_overall[0], 1u); -- ASSERT_EQ(bins_overall[cbits((_2m - 0x1000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits((_1m + _1m / 2 - 0x1000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000 - 0x80000) / 0x1000) - 1], 1u); - ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -- // allocate 132M using 4M granularity should go to (capacity / 2) -+ // Original free space disposition (start chunk, count): -+ // <0, 383> <387, 126>, -+ // allocate 132M (=33792*4096) = using 4M granularity should go to (capacity / 2) - uint64_t allocated4 = 0; - interval_vector_t a4; - al2.allocate_l2(132 * _1m, 4 * _1m , &allocated4, &a4); -@@ -799,24 +820,40 @@ - bins_overall.clear(); - al2.collect_stats(bins_overall); - ASSERT_EQ(bins_overall.size(), 3u); -+ ASSERT_EQ(bins_overall[cbits((_1m + _1m / 2 - 0x1000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000 - 0x80000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2 - 33792) - 1], 1u); - } - { -- // cleanup left 4K chunk in the first 2M -+ // Original free space disposition (start chunk, count): -+ // <0, 383> <387, 126>, -+ // cleanup remaining 4*4K chunks in the first 2M - interval_vector_t r; -- r.emplace_back(2 * _1m - 0x1000, 0x1000); -+ r.emplace_back(383 * 4096, 4 * 0x1000); - al2.free_l2(r); - bins_overall.clear(); - al2.collect_stats(bins_overall); - - ASSERT_EQ(bins_overall.size(), 2u); -+ ASSERT_EQ(bins_overall[cbits((2 * _1m + 0x1000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2 - 33792) - 1], 1u); - } - { -+ // Original free space disposition (start chunk, count): -+ // <0, 513>, - // release 132M @(capacity / 2) - interval_vector_t r; - r.emplace_back(capacity / 2, 132 * _1m); - al2.free_l2(r); -+ bins_overall.clear(); -+ al2.collect_stats(bins_overall); -+ ASSERT_EQ(bins_overall.size(), 2u); -+ ASSERT_EQ(bins_overall[cbits((2 * _1m + 0x1000) / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -+ // Original free space disposition (start chunk, count): -+ // <0, 513>, - // allocate 132M using 2M granularity should go to the first chunk and to - // (capacity / 2) - uint64_t allocated4 = 0; -@@ -827,14 +864,31 @@ - ASSERT_EQ(a4[0].length, 2 * _1m); - ASSERT_EQ(a4[1].offset, capacity / 2); - ASSERT_EQ(a4[1].length, 130 * _1m); -+ -+ bins_overall.clear(); -+ al2.collect_stats(bins_overall); -+ -+ ASSERT_EQ(bins_overall.size(), 2u); -+ ASSERT_EQ(bins_overall[cbits(0)], 1u); -+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2 - 33792) - 1], 1u); - } - { -+ // Original free space disposition (start chunk, count): -+ // <512, 1>, - // release 130M @(capacity / 2) - interval_vector_t r; - r.emplace_back(capacity / 2, 132 * _1m); - al2.free_l2(r); -+ bins_overall.clear(); -+ al2.collect_stats(bins_overall); -+ -+ ASSERT_EQ(bins_overall.size(), 2u); -+ ASSERT_EQ(bins_overall[cbits(0)], 1u); -+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -+ // Original free space disposition (start chunk, count): -+ // <512,1>, - // release 4K~16K - // release 28K~32K - // release 68K~24K -@@ -843,21 +897,46 @@ - r.emplace_back(0x7000, 0x8000); - r.emplace_back(0x11000, 0x6000); - al2.free_l2(r); -+ -+ bins_overall.clear(); -+ al2.collect_stats(bins_overall); -+ -+ ASSERT_EQ(bins_overall.size(), 4u); -+ ASSERT_EQ(bins_overall[cbits(0)], 1u); -+ ASSERT_EQ(bins_overall[cbits(0x4000 / 0x1000) - 1], 2u); // accounts both 0x4000 & 0x6000 -+ ASSERT_EQ(bins_overall[cbits(0x8000 / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u); - } - { -- // allocate 32K using 16K granularity - should bypass the first -- // unaligned extent, use the second free extent partially given -- // the 16K alignment and then fallback to capacity / 2 -+ // Original free space disposition (start chunk, count): -+ // <1, 4>, <7, 8>, <17, 6> <512,1>, -+ // allocate 80K using 16K granularity - uint64_t allocated4 = 0; - interval_vector_t a4; -- al2.allocate_l2(0x8000, 0x4000, &allocated4, &a4); -- ASSERT_EQ(a4.size(), 2u); -- ASSERT_EQ(a4[0].offset, 0x8000u); -- ASSERT_EQ(a4[0].length, 0x4000u); -- ASSERT_EQ(a4[1].offset, capacity / 2); -+ al2.allocate_l2(0x14000, 0x4000, &allocated4, &a4); -+ -+ ASSERT_EQ(a4.size(), 4); -+ ASSERT_EQ(a4[1].offset, 0x1000u); - ASSERT_EQ(a4[1].length, 0x4000u); -- } -+ ASSERT_EQ(a4[0].offset, 0x7000u); -+ ASSERT_EQ(a4[0].length, 0x8000u); -+ ASSERT_EQ(a4[2].offset, 0x11000u); -+ ASSERT_EQ(a4[2].length, 0x4000u); -+ ASSERT_EQ(a4[3].offset, capacity / 2); -+ ASSERT_EQ(a4[3].length, 0x4000u); -+ -+ bins_overall.clear(); -+ al2.collect_stats(bins_overall); - -+ ASSERT_EQ(bins_overall.size(), 3u); -+ ASSERT_EQ(bins_overall[cbits(0)], 1u); -+ ASSERT_EQ(bins_overall[cbits(0x2000 / 0x1000) - 1], 1u); -+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2 - 1) - 1], 1u); -+ } -+ { -+ // Original free space disposition (start chunk, count): -+ // <21, 2> <512,1>, -+ } - } - std::cout << "Done L2 cont aligned" << std::endl; - } -@@ -913,7 +992,7 @@ - al2.allocate_l2(0x3e000000, _1m, &allocated4, &a4); - ASSERT_EQ(a4.size(), 2u); - ASSERT_EQ(allocated4, 0x3e000000u); -- ASSERT_EQ(a4[0].offset, 0x5fed00000u); -+ ASSERT_EQ(a4[0].offset, 0x5fec30000u); - ASSERT_EQ(a4[0].length, 0x1300000u); - ASSERT_EQ(a4[1].offset, 0x628000000u); - ASSERT_EQ(a4[1].length, 0x3cd00000u); -diff -ur ceph-18.2.1~/src/test/objectstore/store_test.cc ceph-18.2.1/src/test/objectstore/store_test.cc ---- ceph-18.2.1~/src/test/objectstore/store_test.cc 2023-11-14 14:36:19.000000000 -0500 -+++ ceph-18.2.1/src/test/objectstore/store_test.cc 2023-12-11 16:55:38.000000000 -0500 -@@ -9524,9 +9524,9 @@ - string key; - _key_encode_u64(1, &key); - bluestore_shared_blob_t sb(1); -- sb.ref_map.get(0x2000, block_size); -- sb.ref_map.get(0x4000, block_size); -- sb.ref_map.get(0x4000, block_size); -+ sb.ref_map.get(0x822000, block_size); -+ sb.ref_map.get(0x824000, block_size); -+ sb.ref_map.get(0x824000, block_size); - bufferlist bl; - encode(sb, bl); - bstore->inject_broken_shared_blob_key(key, bl); diff --git a/0036-src-cephadm-build.py.patch b/0036-src-cephadm-build.py.patch new file mode 100644 index 0000000..61ff392 --- /dev/null +++ b/0036-src-cephadm-build.py.patch @@ -0,0 +1,11 @@ +--- ceph-19.0.0-28-g77e2e020/src/cephadm/build.py.orig 2023-12-14 13:03:12.873138944 -0500 ++++ ceph-19.0.0-28-g77e2e020/src/cephadm/build.py 2023-12-14 13:03:31.909811381 -0500 +@@ -73,7 +73,7 @@ + def __init__(self, cli_args): + self.cli_args = cli_args + self._maj_min = sys.version_info[0:2] +- self.install_dependencies = True ++ self.install_dependencies = False + self.deps_mode = DependencyMode[cli_args.bundled_dependencies] + if self.deps_mode == DependencyMode.none: + self.install_dependencies = False diff --git a/0039-src-common-dout.h.patch b/0039-src-common-dout.h.patch deleted file mode 100644 index 73b9b21..0000000 --- a/0039-src-common-dout.h.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/src/common/dout.h b/src/common/dout.h -index 4cd60efff8fef..db68a042a7f1b 100644 ---- a/src/common/dout.h -+++ b/src/common/dout.h -@@ -144,17 +144,24 @@ struct is_dynamic> : public std::true_type {}; - #else - #define dout_impl(cct, sub, v) \ - do { \ -- const bool should_gather = [&](const auto cctX) { \ -- if constexpr (ceph::dout::is_dynamic::value || \ -- ceph::dout::is_dynamic::value) { \ -+ const bool should_gather = [&](const auto cctX, auto sub_, auto v_) { \ -+ /* The check is performed on `sub_` and `v_` to leverage the C++'s \ -+ * guarantee on _discarding_ one of blocks of `if constexpr`, which \ -+ * includes also the checks for ill-formed code (`should_gather<>` \ -+ * must not be feed with non-const expresions), BUT ONLY within \ -+ * a template (thus the generic lambda) and under the restriction \ -+ * it's dependant on a parameter of this template). \ -+ * GCC prior to v14 was not enforcing these restrictions. */ \ -+ if constexpr (ceph::dout::is_dynamic::value || \ -+ ceph::dout::is_dynamic::value) { \ - return cctX->_conf->subsys.should_gather(sub, v); \ - } else { \ -- /* The parentheses are **essential** because commas in angle \ -- * brackets are NOT ignored on macro expansion! A language's \ -- * limitation, sorry. */ \ -- return (cctX->_conf->subsys.template should_gather()); \ -+ constexpr auto sub_helper = static_cast(sub); \ -+ constexpr auto v_helper = static_cast(v); \ -+ return cctX->_conf->subsys.template should_gather(); \ - } \ -- }(cct); \ -+ }(cct, sub, v); \ - \ - if (should_gather) { \ - ceph::logging::MutableEntry _dout_e(v, sub); \ diff --git a/0040-gcc-14.patch b/0040-gcc-14.patch new file mode 100644 index 0000000..72dd5e8 --- /dev/null +++ b/0040-gcc-14.patch @@ -0,0 +1,41 @@ +From f5d3e9146d9ceb12858bc94d60090bd851b1c088 Mon Sep 17 00:00:00 2001 +From: Adam Emerson +Date: Wed, 20 Dec 2023 13:51:21 -0500 +Subject: [PATCH] test/neorados: Use two fewer GTest internals + +To get coroutine tests working, I used some internals. Two of these +are no longer available in newer versions. Since they can be +implemented with regular old C++ features, use those. + +This fixes an FTBFS on Fedora Rawhide introduced in +`35231f7251ed70d8d817ee7e727d9763669d101f`. + +Signed-off-by: Adam Emerson +--- + src/test/neorados/common_tests.h | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/test/neorados/common_tests.h b/src/test/neorados/common_tests.h +index 9610f08f643f3..396432e417e84 100644 +--- a/src/test/neorados/common_tests.h ++++ b/src/test/neorados/common_tests.h +@@ -391,10 +391,14 @@ class NeoRadosECTest : public NeoRadosTestBase { + public: \ + GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() = default; \ + ~GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() override = default; \ +- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \ +- test_name)); \ +- GTEST_DISALLOW_MOVE_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \ +- test_name)); \ ++ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)( \ ++ const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&) = delete; \ ++ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)& operator =( \ ++ const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&) = delete; \ ++ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)( \ ++ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&&) = delete; \ ++ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)& operator =( \ ++ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&&) = delete; \ + \ + private: \ + boost::asio::awaitable CoTestBody() override; \ + diff --git a/0041-src-boost-boost-python-call_method.hpp.patch b/0041-src-boost-boost-python-call_method.hpp.patch new file mode 100644 index 0000000..7f908b2 --- /dev/null +++ b/0041-src-boost-boost-python-call_method.hpp.patch @@ -0,0 +1,11 @@ +--- ceph-18.2.3/src/boost/boost/python/call_method.hpp.orig 2024-06-07 11:14:58.579734749 -0400 ++++ ceph-18.2.3/src/boost/boost/python/call_method.hpp 2024-06-07 11:19:06.754520504 -0400 +@@ -59,7 +59,7 @@ + ) + { + PyObject* const result = +- PyEval_CallMethod( ++ PyObject_CallMethod( + self + , const_cast(name) + , const_cast("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")") diff --git a/0041-src-mgr-PyModule.cc.patch b/0041-src-mgr-PyModule.cc.patch new file mode 100644 index 0000000..937a18a --- /dev/null +++ b/0041-src-mgr-PyModule.cc.patch @@ -0,0 +1,19 @@ +--- ceph-18.2.3/src/mgr/PyModule.cc.orig 2024-06-06 16:31:10.340731851 -0400 ++++ ceph-18.2.3/src/mgr/PyModule.cc 2024-06-07 12:58:49.913571410 -0400 +@@ -342,6 +342,16 @@ + return ceph_module; + } + ++// FIXME ++// Removed in Python 3.13 API, but kept for the stable ABI ++#ifdef __cplusplus ++extern "C" { ++#endif ++PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); ++#ifdef __cplusplus ++} ++#endif ++ + int PyModule::load(PyThreadState *pMainThreadState) + { + ceph_assert(pMainThreadState != nullptr); diff --git a/0042-src-common-dout.h.patch b/0042-src-common-dout.h.patch new file mode 100644 index 0000000..129f50e --- /dev/null +++ b/0042-src-common-dout.h.patch @@ -0,0 +1,141 @@ +From 0eace4ea9ea42412d4d6a16d24a8660642e41173 Mon Sep 17 00:00:00 2001 +From: Radoslaw Zarzynski +Date: Wed, 24 Jan 2024 17:22:44 +0000 +Subject: [PATCH] common/dout: fix FTBFS on GCC 14 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The following problem has been reported by Kaleb Keithley: + +``` +/builddir/build/BUILD/ceph-18.2.1/src/osd/osd_types.h: In lambda function: +/builddir/build/BUILD/ceph-18.2.1/src/common/dout.h:184:73: error: call to non-‘constexpr’ function ‘virtual unsigned int DoutPrefixProvider::get_subsys() const’ + 184 | dout_impl(pdpp->get_cct(), ceph::dout::need_dynamic(pdpp->get_subsys()), v) \ + | ~~~~~~~~~~~~~~~~^~ +/builddir/build/BUILD/ceph-18.2.1/src/common/dout.h:155:58: note: in definition of macro ‘dout_impl’ + 155 | return (cctX->_conf->subsys.template should_gather()); \ + | ^~~ +/builddir/build/BUILD/ceph-18.2.1/src/osd/osd_types.h:3617:3: note: in expansion of macro ‘ldpp_dout’ + 3617 | ldpp_dout(dpp, 10) << "build_prior all_probe " << all_probe << dendl; + | ^~~~~~~~~ +``` + +For details of the problem and the idea behind the fix, +please refer to the comment this commit brings to `dout.h`. + +The minimized replicator that the facilitated Goldbot-based +investigation: + +```cpp +namespace ceph::dout { + +template +struct dynamic_marker_t { + T value; + // constexpr ctor isn't needed as it's an aggregate type + constexpr operator T() const { return value; } +}; + +template +constexpr dynamic_marker_t need_dynamic(T&& t) { + return dynamic_marker_t{ std::forward(t) }; +} + +template +struct is_dynamic : public std::false_type {}; + +template +struct is_dynamic> : public std::true_type {}; + +} // ceph::dout + +struct subsys_t { + template + bool should_gather() const { + return true; + } + bool should_gather(const unsigned sub, int level) const { + return false; + } +}; + +static subsys_t subsys; + + do { \ + const bool should_gather = [&](const auto cctX) { \ + if constexpr (ceph::dout::is_dynamic::value || \ + ceph::dout::is_dynamic::value) { \ + std::cout << "the dynamic path" << std::endl; \ + return subsys.should_gather(sub, v); \ + } else { \ + /* The parentheses are **essential** because commas in angle \ + * brackets are NOT ignored on macro expansion! A language's \ + * limitation, sorry. */ \ + std::cout << "the static path" << std::endl; \ + /*return subsys.should_gather(sub, v);*/ \ + return (subsys.template should_gather()); \ + } \ + }(cct); \ + } while (0) + + if (decltype(auto) pdpp = (dpp); pdpp) /* workaround -Wnonnull-compare for 'this' */ \ + dout_impl(42, sub, v) + + if (decltype(auto) pdpp = (dpp); pdpp) /* workaround -Wnonnull-compare for 'this' */ \ + dout_impl(42, ceph::dout::need_dynamic(42), v) + +int main() { + std::random_device dev; + std::mt19937 rng(dev()); + std::uniform_int_distribution dist6(1,6); // distribution in range [1, 6] + + int sub = dist6(rng); + ldpp_dout("mocked out", sub); + //ldpp_subdout("mocked out", 4, 3); +} +``` + +Fixes: https://tracker.ceph.com/issues/64050 +Signed-off-by: Radoslaw Zarzynski +--- + src/common/dout.h | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +diff --git a/src/common/dout.h b/src/common/dout.h +index 4cd60efff8fef..6516060c5438e 100644 +--- a/src/common/dout.h ++++ b/src/common/dout.h +@@ -144,17 +144,27 @@ struct is_dynamic> : public std::true_type {}; + #else + #define dout_impl(cct, sub, v) \ + do { \ +- const bool should_gather = [&](const auto cctX) { \ +- if constexpr (ceph::dout::is_dynamic::value || \ +- ceph::dout::is_dynamic::value) { \ ++ const bool should_gather = [&](const auto cctX, auto sub_, auto v_) { \ ++ /* The check is performed on `sub_` and `v_` to leverage the C++'s \ ++ * guarantee on _discarding_ one of blocks of `if constexpr`, which \ ++ * includes also the checks for ill-formed code (`should_gather<>` \ ++ * must not be feed with non-const expresions), BUT ONLY within \ ++ * a template (thus the generic lambda) and under the restriction \ ++ * it's dependant on a parameter of this template). \ ++ * GCC prior to v14 was not enforcing these restrictions. */ \ ++ if constexpr (ceph::dout::is_dynamic::value || \ ++ ceph::dout::is_dynamic::value) { \ + return cctX->_conf->subsys.should_gather(sub, v); \ + } else { \ ++ constexpr auto sub_helper = static_cast(sub); \ ++ constexpr auto v_helper = static_cast(v); \ + /* The parentheses are **essential** because commas in angle \ + * brackets are NOT ignored on macro expansion! A language's \ + * limitation, sorry. */ \ +- return (cctX->_conf->subsys.template should_gather()); \ ++ return (cctX->_conf->subsys.template should_gather()); \ + } \ +- }(cct); \ ++ }(cct, sub, v); \ + \ + if (should_gather) { \ + ceph::logging::MutableEntry _dout_e(v, sub); \ diff --git a/0043_src_common_crc32c_ppc_asm.S.patch b/0043_src_common_crc32c_ppc_asm.S.patch new file mode 100644 index 0000000..1abb498 --- /dev/null +++ b/0043_src_common_crc32c_ppc_asm.S.patch @@ -0,0 +1,15 @@ +--- ceph-19.1.0/src/common/crc32c_ppc_asm.S.orig 2024-07-10 10:55:06.255480790 -0400 ++++ ceph-19.1.0/src/common/crc32c_ppc_asm.S 2024-07-10 12:53:42.844075490 -0400 +@@ -54,11 +54,8 @@ + /* byte reverse permute constant */ + .octa 0x0F0E0D0C0B0A09080706050403020100 + +-#ifdef CRC32_CONSTANTS_HEADER +-#include CRC32_CONSTANTS_HEADER +-#else ++#define __ASSEMBLY__ + #include "crc32c_ppc_constants.h" +-#endif + + .text + diff --git a/ceph.spec b/ceph.spec index e9f0b98..f02e4a3 100644 --- a/ceph.spec +++ b/ceph.spec @@ -25,7 +25,6 @@ %if %{without server} %bcond_with make_check -%bcond_with zbd %bcond_with cmake_verbose_logging %bcond_with ceph_test_package %bcond_with tcmalloc @@ -146,6 +145,16 @@ %bcond_with system_arrow %bcond_with system_utf8proc %endif +# qat only supported for intel devices +%ifarch x86_64 +%if 0%{?fedora} || 0%{?rhel} >= 9 +%bcond_without system_qat +%else +%bcond_with system_qat +%endif +%else +%bcond_with system_qat +%endif %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8 %global weak_deps 1 %endif @@ -159,6 +168,8 @@ %{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0} %endif %endif +%bcond_without cephadm_bundling +%bcond_without cephadm_pip_deps %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} @@ -166,6 +177,7 @@ %{!?python3_version_nodots: %global python3_version_nodots 3} %{!?python3_version: %global python3_version 3} %{!?gts_prefix: %global gts_prefix gcc-toolset-11} +%define _lto_cflags %{nil} %if ! 0%{?suse_version} # use multi-threaded xz compression: xz level 7 using ncpus threads @@ -205,8 +217,8 @@ # main package definition ################################################################################# Name: ceph -Version: 18.2.3 -Release: 1%{?dist} +Version: 19.1.0 +Release: 0.1%{?dist} %if 0%{?fedora} || 0%{?rhel} Epoch: 2 %endif @@ -225,23 +237,24 @@ Source0: https://download.ceph.com/tarballs/ceph-%{version}.tar.gz #Source0: https://1.chacra.ceph.com/r/ceph/quincy/ Patch0001: 0001-src-common-crc32c_intel_fast.patch Patch0003: 0003-src-common-bitstr.h.patch -Patch0008: 0008-cmake-modules-Finduring.cmake.patch Patch0010: 0010-CET-Add-CET-marker-to-crc32c_intel_fast_zero_asm.s.patch Patch0011: 0011-isa-l-CET-Add-CET-marker-to-x86-64-crc32-assembly-co.patch Patch0012: 0012-spdk-isa-l-CET-Add-CET-marker-to-x86-64-crc32-assemb.patch Patch0016: 0016-src-tracing-patch Patch0017: 0017-gcc-12-omnibus.patch Patch0018: 0018-src-rgw-store-dbstore-CMakeLists.txt.patch -Patch0020: 0020-src-arrow-cpp-cmake_modules-ThirdpartyToolchain.cmake.patch Patch0024: 0024-gcc-13.patch Patch0029: 0029-src-rgw-rgw_amqp.cc.patch -Patch0030: 0030-src-rgw-rgw_asio_client.cc.patch Patch0032: 0032-cmake-modules-BuildBoost.cmake.patch Patch0033: 0033-boost-asm.patch Patch0034: 0034-src-pybind-rbd-rbd.pyx.patch Patch0035: 0035-src-CMakeLists.txt.patch -Patch0038: ceph-c99-2.patch -Patch0039: 0039-src-common-dout.h.patch +Patch0036: 0036-src-cephadm-build.py.patch +Patch0040: 0040-gcc-14.patch +Patch0041: 0041-src-mgr-PyModule.cc.patch +Patch0042: 0042-src-common-dout.h.patch +Patch0043: 0043_src_common_crc32c_ppc_asm.S.patch + # ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787 ExcludeArch: i686 armv7hl %if 0%{?suse_version} @@ -272,12 +285,12 @@ BuildRequires: fuse3-devel BuildRequires: gcc-c++ >= 11 %endif %if 0%{?suse_version} == 1500 -BuildRequires: gcc11-c++ +BuildRequires: gcc11-c++ %endif %if 0%{?rhel} == 8 -BuildRequires: %{gts_prefix}-gcc-c++ -BuildRequires: %{gts_prefix}-build -BuildRequires: %{gts_prefix}-libatomic-devel +BuildRequires: %{gts_prefix}-gcc-c++ +BuildRequires: %{gts_prefix}-build +BuildRequires: %{gts_prefix}-libatomic-devel %endif %if 0%{?fedora} || 0%{?rhel} >= 9 BuildRequires: libatomic @@ -339,6 +352,7 @@ BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-Cython +BuildRequires: python%{python3_pkgversion}-markupsafe BuildRequires: snappy-devel BuildRequires: sqlite-devel BuildRequires: sudo @@ -351,6 +365,7 @@ BuildRequires: xfsprogs-devel BuildRequires: xmlstarlet BuildRequires: nasm BuildRequires: lua-devel +BuildRequires: lmdb-devel %if 0%{with seastar} || 0%{with jaeger} BuildRequires: yaml-cpp-devel >= 0.6 %endif @@ -361,7 +376,8 @@ BuildRequires: librabbitmq-devel BuildRequires: librdkafka-devel %endif %if 0%{with lua_packages} -BuildRequires: %{luarocks_package_name} +BuildRequires: lua-devel +Requires: %{luarocks_package_name} %endif %if 0%{with make_check} BuildRequires: hostname @@ -377,9 +393,6 @@ BuildRequires: socat BuildRequires: python%{python3_pkgversion}-asyncssh BuildRequires: python%{python3_pkgversion}-natsort %endif -%if 0%{with zbd} -BuildRequires: libzbd-devel -%endif %if 0%{with jaeger} || 0%{with radosgw} %if 0%{?suse_version} BuildRequires: libthrift-devel >= 0.13.0 @@ -413,6 +426,10 @@ BuildRequires: libarrow-devel BuildRequires: parquet-libs-devel BuildRequires: utf8proc-devel %endif +%if 0%{with system_qat} +BuildRequires: qatlib-devel +BuildRequires: qatzip-devel +%endif %if 0%{with seastar} BuildRequires: c-ares-devel BuildRequires: gnutls-devel @@ -421,15 +438,15 @@ BuildRequires: libpciaccess-devel BuildRequires: lksctp-tools-devel BuildRequires: ragel BuildRequires: systemtap-sdt-devel -%if 0%{?fedora} || 0%{?rhel} >= 10 BuildRequires: libubsan BuildRequires: libasan -%endif +BuildRequires: protobuf-devel +BuildRequires: protobuf-compiler %if 0%{?rhel} == 8 -BuildRequires: %{gts_prefix}-annobin -BuildRequires: %{gts_prefix}-annobin-plugin-gcc -BuildRequires: %{gts_prefix}-libubsan-devel -BuildRequires: %{gts_prefix}-libasan-devel +BuildRequires: %{gts_prefix}-annobin +BuildRequires: %{gts_prefix}-annobin-plugin-gcc +BuildRequires: %{gts_prefix}-libubsan-devel +BuildRequires: %{gts_prefix}-libasan-devel %endif %endif ################################################################################# @@ -473,6 +490,7 @@ BuildRequires: librdmacm-devel BuildRequires: openldap-devel #BuildRequires: krb5-devel BuildRequires: openssl-devel +BuildRequires: openssl-devel-engine BuildRequires: CUnit-devel BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-prettytable @@ -604,6 +622,13 @@ Requires: which %if 0%{?weak_deps} Recommends: podman >= 2.0.2 %endif +%if 0%{with cephadm_bundling} +%if 0%{without cephadm_pip_deps} +BuildRequires: python3-jinja2 >= 2.10 +%endif +%else +Requires: python3-jinja2 >= 2.10 +%endif %description -n cephadm Utility to bootstrap a Ceph cluster and manage Ceph daemons deployed with systemd and podman. @@ -698,12 +723,20 @@ Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release} Requires: ceph-prometheus-alerts = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-setuptools +%if 0%{?fedora} || 0%{?rhel} >= 9 +Requires: python%{python3_pkgversion}-grpcio +Requires: python%{python3_pkgversion}-grpcio-tools +%endif %if 0%{?fedora} || 0%{?rhel} Requires: python%{python3_pkgversion}-cherrypy Requires: python%{python3_pkgversion}-routes Requires: python%{python3_pkgversion}-werkzeug %if 0%{?weak_deps} Recommends: python%{python3_pkgversion}-saml +%if 0%{?fedora} || 0%{?rhel} <= 8 +Recommends: python%{python3_pkgversion}-grpcio +Recommends: python%{python3_pkgversion}-grpcio-tools +%endif %endif %endif %if 0%{?suse_version} @@ -817,7 +850,7 @@ Summary: Ceph fuse-based client %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: fuse3 +Requires: fuse Requires: python%{python3_pkgversion} %description fuse FUSE based client for Ceph distributed network file system @@ -939,6 +972,9 @@ Provides: ceph-test:/usr/bin/ceph-osdomap-tool Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} Requires: sudo Requires: libstoragemgmt +%if 0%{with seastar} +Requires: protobuf +%endif %if 0%{?weak_deps} Recommends: ceph-volume = %{_epoch_prefix}%{version}-%{release} %endif @@ -1381,10 +1417,10 @@ Group: System/Monitoring This package provides a Ceph MIB for SNMP traps. %package node-proxy -Summary: hw monitoring agent for Ceph -BuildArch: noarch +Summary: hw monitoring agent for Ceph +BuildArch: noarch %if 0%{?suse_version} -Group: System/Monitoring +Group: System/Monitoring %endif %description node-proxy This package provides a Ceph hardware monitoring agent. @@ -1394,14 +1430,9 @@ This package provides a Ceph hardware monitoring agent. # common ################################################################################# %prep -%autosetup -p1 -n %{name}-%{version} +%autosetup -p1 %build -# Disable lto on systems that do not support symver attribute -# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200 for details -%if ( 0%{?rhel} && 0%{?rhel} < 9 ) || ( 0%{?suse_version} && 0%{?suse_version} <= 1500 ) - %define _lto_cflags %{nil} -%endif %if 0%{with cephfs_java} # Find jni.h @@ -1495,9 +1526,6 @@ env | sort %if 0%{without lua_packages} -DWITH_RADOSGW_LUA_PACKAGES:BOOL=OFF \ %endif -%if 0%{with zbd} - -DWITH_ZBD:BOOL=ON \ -%endif %if 0%{with cmake_verbose_logging} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ %endif @@ -1513,11 +1541,6 @@ env | sort %if 0%{without jaeger} -DWITH_JAEGER:BOOL=OFF \ %endif -%if 0%{?suse_version} - -DBOOST_J:STRING=%{jobs} \ -%else - -DBOOST_J:STRING=%{_smp_build_ncpus} \ -%endif %if 0%{with ceph_test_package} -DWITH_SYSTEM_GTEST:BOOL=ON \ %endif @@ -1529,6 +1552,16 @@ env | sort -DWITH_SYSTEM_ARROW:BOOL=ON \ -DWITH_SYSTEM_UTF8PROC:BOOL=ON \ %endif +%ifarch x86_64 aarch64 +%if 0%{with system_qat} + -DWITH_SYSTEM_QATLIB:BOOL=ON \ + -DWITH_SYSTEM_QATZIP:BOOL=ON \ +%endif +%else + -DWITH_QATDRV:BOOL=OFF \ + -DWITH_QATLIB:BOOL=OFF \ + -DWITH_QATZIP:BOOL=OFF \ +%endif %if 0%{with ld_mold} -DCMAKE_LINKER=%{_bindir}/ld.mold \ %endif @@ -1536,6 +1569,20 @@ env | sort -DWITH_SEASTAR:BOOL=ON \ -DWITH_JAEGER:BOOL=OFF \ %endif +%if 0%{with cephadm_bundling} +%if 0%{with cephadm_pip_deps} + -DCEPHADM_BUNDLED_DEPENDENCIES=pip \ +%else + -DCEPHADM_BUNDLED_DEPENDENCIES=rpm \ +%endif +%else + -DCEPHADM_BUNDLED_DEPENDENCIES=none \ +%endif +%if 0%{?suse_version} + -DBOOST_J:STRING=%{jobs} \ +%else + -DBOOST_J:STRING=%{_smp_build_ncpus} \ +%endif %if 0%{with server} -DWITH_GRAFANA:BOOL=ON %else @@ -1648,6 +1695,9 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror # prometheus alerts install -m 644 -D monitoring/ceph-mixin/prometheus_alerts.yml %{buildroot}/etc/prometheus/ceph/ceph_default_alerts.yml +# grafana charts +install -m 644 -D monitoring/ceph-mixin/dashboards_out/* %{buildroot}/etc/grafana/dashboards/ceph-dashboard/ + # SNMP MIB install -m 644 -D -t %{buildroot}%{_datadir}/snmp/mibs monitoring/snmp/CEPH-MIB.txt @@ -1868,7 +1918,6 @@ fi %exclude %{_sbindir}/ceph-node-proxy %exclude %{python3_sitelib}/ceph_node_proxy/* %exclude %{python3_sitelib}/ceph_node_proxy-* -%{_unitdir}/ceph-exporter.service %endif %if 0%{with server} @@ -1951,6 +2000,7 @@ exit 0 %{_mandir}/man8/rbd-replay-prep.8* %if 0%{with radosgw} %{_mandir}/man8/rgw-orphan-list.8* +%{_mandir}/man8/rgw-restore-bucket-index.8* %endif %dir %{_datadir}/ceph/ %{_datadir}/ceph/known_hosts_drop.ceph.com @@ -2286,7 +2336,6 @@ fi %files -n ceph-exporter %{_bindir}/ceph-exporter -%{_unitdir}/ceph-exporter.service %files -n rbd-fuse %{_bindir}/rbd-fuse @@ -2882,6 +2931,9 @@ exit 0 %endif %changelog +* Tue Jul 9 2024 Kaleb S. KEITHLEY - 2:19.1.0-0.1 +- ceph-19.1.0 RC + * Mon Apr 29 2024 Kaleb S. KEITHLEY - 2:18.2.3-1 - ceph-18.2.3 GA @@ -2952,162 +3004,3 @@ exit 0 * Tue Jun 13 2023 Kaleb S. KEITHLEY - 2:18.1.0-0.1 - ceph-18.1.0 RC1 -* Wed Jun 07 2023 Yaakov Selkowitz - 2:17.2.6-8 -- Do not use mold in RHEL/ELN builds - -* Tue May 9 2023 Kaleb S. KEITHLEY - 2:17.2.6-7 -- ceph-17.2.6, use ldconfig and ldconfig_scriptlet macros - -* Tue May 9 2023 Kaleb S. KEITHLEY - 2:17.2.6-6 -- ceph-17.2.6, log create of global_legacy_options.h - -* Mon May 1 2023 Kaleb S. KEITHLEY - 2:17.2.6-5 -- ceph-17.2.6, rebuild with libarrow-12.0.0 - -* Sun Apr 30 2023 Kaleb S. KEITHLEY - 2:17.2.6-4 -- ceph-17.2.6, rebuild bundled boost asm with IBT, SHSTK (librgw.so) - -* Thu Apr 27 2023 Kaleb S. KEITHLEY - 2:17.2.6-3 -- ceph-17.2.6, rebuild bundled boost with -fcf-protection (libceph_common.so) - -* Thu Apr 20 2023 Kaleb S. KEITHLEY - 2:17.2.6-2 -- ceph-17.2.6, rebuild with bundled rocksdb until ready for rocksdb-8.x - -* Fri Apr 7 2023 Kaleb S. KEITHLEY - 2:17.2.6-1 -- ceph-17.2.6 GA - -* Wed Feb 22 2023 Kaleb S. KEITHLEY - 2:17.2.5-13 -- ceph-17.2.5, rebuild with bundled boost until boost-1.81 compatible - -* Mon Feb 20 2023 Jonathan Wakely - 2:17.2.5-12 -- Rebuilt for Boost 1.81 - -* Fri Feb 17 2023 Kaleb S. KEITHLEY - 2:17.2.5-11 -- ceph-17.2.5, rebuild with libarrow-11, this time for real - -* Wed Feb 15 2023 Kaleb S. KEITHLEY - 2:17.2.5-10 -- ceph-17.2.5, rebuild with libarrow-11 - -* Fri Jan 27 2023 Kaleb S. KEITHLEY - 2:17.2.5-9 -- ceph-17.2.5, more ELN (rhel 10) - -* Thu Jan 26 2023 Kaleb S. KEITHLEY - 2:17.2.5-8 -- ceph-17.2.5, rocksdb on ELN (rhel 10) - -* Tue Jan 24 2023 Kaleb S. KEITHLEY - 2:17.2.5-7 -- ceph-17.2.5, rebuild with gtest-13 rhbz#2163823 - -* Fri Jan 20 2023 Siddhesh Poyarekar - 2:17.2.5-6 -- Use _fortify_level to disable fortification. - -* Thu Jan 19 2023 Ondrej Mosnacek -- Prepare for anon inode SELinux controls enablement - -* Wed Jan 18 2023 Fedora Release Engineering - 2:17.2.5-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Jan 17 2023 Kaleb S. KEITHLEY - 2:17.2.5-4 -- ceph-17.2.5, rebuild with gcc-13 - -* Sat Dec 31 2022 Pete Walter - 2:17.2.5-3 -- Rebuild for ICU 72 - -* Thu Dec 1 2022 Kaleb S. KEITHLEY - 2:17.2.5-2 -- ceph-17.2.5, rebuild with libarrow-10 - -* Fri Nov 11 2022 Kaleb S. KEITHLEY -- SPDX migration - -* Tue Oct 18 2022 Kaleb S. KEITHLEY - 2:17.2.5-1 -- ceph-17.2.5 GA - -* Fri Sep 30 2022 Kaleb S. KEITHLEY - 2:17.2.4-1 -- ceph-17.2.4 GA - -* Mon Aug 22 2022 Kaleb S. KEITHLEY - 2:17.2.3-5 -- ceph-17.2.3 revised patch for libarrow-9.0.0 - -* Wed Aug 3 2022 Kaleb S. KEITHLEY - 2:17.2.3-4 -- ceph-17.2.3 rebuild with libarrow-9.0.0 - -* Wed Aug 3 2022 Kaleb S. KEITHLEY - 2:17.2.3-3 -- ceph-17.2.3 fmt for ELN - -* Mon Aug 01 2022 Frantisek Zatloukal - 2:17.2.3-2 -- Rebuilt for ICU 71.1 - -* Fri Jul 29 2022 Kaleb S. KEITHLEY - 2:17.2.3-1 -- ceph-17.2.3 GA - -* Fri Jul 22 2022 Kaleb S. KEITHLEY - 2:17.2.2-1 -- ceph-17.2.2 GA - -* Wed Jul 20 2022 Fedora Release Engineering - 2:17.2.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jul 18 2022 Kaleb S. KEITHLEY - 2:17.2.1-6 -- Rebuild for fmt-9, src/mon/LogMonitor.cc fix - -* Sun Jul 17 2022 Robert-André Mauchin - 2:17.2.1-5 -- Rebuild for new fmt - -* Wed Jul 6 2022 Kaleb S. KEITHLEY - 2:17.2.1-3 -- enable cephfs-shell - -* Tue Jun 28 2022 Kaleb S. KEITHLEY - 2:17.2.1-2 -- ceph-17.2.1, rhbz#2101744, rebuild with gtest, gmock 1.12.0 -- fix inconsistent tabs, spaces -- temporarily disable cephfs-shell until install issues (python3-11?) are resolved - -* Thu Jun 23 2022 Kaleb S. KEITHLEY - 2:17.2.1-1 -- ceph-17.2.1 GA - -* Fri Jun 17 2022 Robert-André Mauchin - 2:17.2.0-7 -- Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327, CVE-2022-27191, - CVE-2022-29526, CVE-2022-30629 - -* Wed Jun 15 2022 Python Maint - 2:17.2.0-6 -- Rebuilt for Python 3.11 - -* Thu May 19 2022 Kaleb S. KEITHLEY - 2:17.2.0-5 -- Rebuild for rocksdb 7.2.2 - -* Wed May 11 2022 Thomas Rodgers - 2:17.2.0-4 -- Rebuilt for Boost 1.78 - -* Wed May 4 2022 Kaleb S. KEITHLEY - 2:17.2.0-3 -- 17.2.0 w/ -DWITH_SYSTEM_ARROW - -* Wed May 04 2022 Thomas Rodgers - 2:17.2.0-2 -- Rebuilt for Boost 1.78 - -* Wed Apr 20 2022 Kaleb S. KEITHLEY - 2:17.2.0-1 -- 17.2.0 GA - -* Thu Apr 14 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.10.201.gcc420538 -- 17.1.0 snapshot 201 - -* Fri Apr 8 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.9.175.g086c8f84 -- 17.1.0 snapshot 175 - -* Mon Mar 28 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.7.123.g14f44feb -- 17.1.0 snapshot 123 - -* Thu Mar 24 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.6.70-g06806b4d -- 17.1.0 snapshot 70 - -* Mon Mar 21 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.5.56-g60fdd357 -- 17.1.0 snapshot 56 - -* Thu Mar 17 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.4.31-g1ccf6db7 -- 17.1.0 snapshot 31 plus rhbz#2064219 (ceph #53266, #54561) - -* Wed Mar 16 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.3.28-g77b78287 -- 17.1.0 snapshot 28 - -* Sat Mar 12 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.2.rc1 -- 17.1.0 RC1 - -* Mon Feb 28 2022 Kaleb S. KEITHLEY - 2:17.1.0-0.1.rc1 -- 17.1.0 RC1 - diff --git a/sources b/sources index a8ccb5c..b59cc0c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ceph-18.2.3.tar.gz) = 224349dcf531570ba0bde63b952f67d34128d76a24f59c6dade487257fbcee1f31dbf45e14e1716da051a6c016080cfa162a86803e08c23e7da1c52605428903 +SHA512 (ceph-19.1.0.tar.gz) = 08e69db2299ca771dec45782214a48fbb227c24660387b65706b8c5b1f7db1854dbb0e03fa47d6135a3f0df919a563df900e85287162456a17688ee9fa74f602