summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2019-09-04 17:02:25 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-09-09 13:29:47 -0400
commit624c5a0621f4a293ef1d420b6fd10db3760aff98 (patch)
tree941403c89ab1cfe38023df7e1bcd79fa3e874405
parentd9d50ff75efdb08d8d558a2922b16ef7bcc9b17d (diff)
downloadmeta-virtualization-624c5a0621f4a293ef1d420b6fd10db3760aff98.tar.gz
ceph: Upgrade to 14.2.3
Upgrade to the latest stable version and backport two patches from master branch to fix the following two build failures which are introduce by upgrading boost to 1.71.0. f1651b8c509d ("rgw: add executor type for basic_waitable_timers") for: src/rgw/rgw_dmclock_async_scheduler.h:45:30: error: could not convert 'boost::asio::basic_waitable_timer<Clock, WaitTraits, Executor>::get_executor() 064f142746ae ("rgw: beast handle_connection() takes io_context") for: src/rgw/rgw_asio_frontend.cc:155:38: error: 'class boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::executor>' has no member named 'get_io_context'; did you mean 'io_control'? Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch27
-rw-r--r--recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch58
-rw-r--r--recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch61
-rw-r--r--recipes-extended/ceph/ceph_14.2.3.bb (renamed from recipes-extended/ceph/ceph_14.1.0.bb)6
4 files changed, 134 insertions, 18 deletions
diff --git a/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch b/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
index 1e23cc1d..4f009f0f 100644
--- a/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
+++ b/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
@@ -1,4 +1,4 @@
1From 20dd3fb9e5daa780e15113a2c88f846c8f5dd904 Mon Sep 17 00:00:00 2001 1From 9b97824ad0da2c0d3dcc0cf41f4506aa7e458e9f Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com> 2From: Dengke Du <dengke.du@windriver.com>
3Date: Mon, 11 Mar 2019 09:14:09 +0800 3Date: Mon, 11 Mar 2019 09:14:09 +0800
4Subject: [PATCH] ceph: fix build errors for cross compile 4Subject: [PATCH] ceph: fix build errors for cross compile
@@ -9,18 +9,22 @@ Subject: [PATCH] ceph: fix build errors for cross compile
9Upstream-Status: Inappropriate [oe specific] 9Upstream-Status: Inappropriate [oe specific]
10 10
11Signed-off-by: Dengke Du <dengke.du@windriver.com> 11Signed-off-by: Dengke Du <dengke.du@windriver.com>
12
13Adjust context for v14.2.3
14
15Signed-off-by: He Zhe <zhe.he@windriver.com>
12--- 16---
13 cmake/modules/Distutils.cmake | 25 +++++-------------------- 17 cmake/modules/Distutils.cmake | 25 +++++--------------------
14 cmake/modules/FindRocksDB.cmake | 6 +++--- 18 cmake/modules/FindRocksDB.cmake | 4 ++--
15 src/compressor/zstd/CMakeLists.txt | 2 +- 19 src/compressor/zstd/CMakeLists.txt | 2 +-
16 src/pybind/cephfs/setup.py | 8 -------- 20 src/pybind/cephfs/setup.py | 8 --------
17 src/pybind/rados/setup.py | 8 -------- 21 src/pybind/rados/setup.py | 8 --------
18 src/pybind/rbd/setup.py | 8 -------- 22 src/pybind/rbd/setup.py | 8 --------
19 src/pybind/rgw/setup.py | 8 -------- 23 src/pybind/rgw/setup.py | 8 --------
20 7 files changed, 9 insertions(+), 56 deletions(-) 24 7 files changed, 8 insertions(+), 55 deletions(-)
21 25
22diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake 26diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
23index 5697dff..de3cd57 100644 27index f70265f..b2f4223 100644
24--- a/cmake/modules/Distutils.cmake 28--- a/cmake/modules/Distutils.cmake
25+++ b/cmake/modules/Distutils.cmake 29+++ b/cmake/modules/Distutils.cmake
26@@ -16,17 +16,8 @@ function(distutils_install_module name) 30@@ -16,17 +16,8 @@ function(distutils_install_module name)
@@ -50,9 +54,9 @@ index 5697dff..de3cd57 100644
50- list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w) 54- list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w)
51+ list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT}) 55+ list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT})
52 # This little bit of magic wipes out __Pyx_check_single_interpreter() 56 # This little bit of magic wipes out __Pyx_check_single_interpreter()
57 # Note: this is reproduced in distutils_install_cython_module
53 list(APPEND cflags -D'void0=dead_function\(void\)') 58 list(APPEND cflags -D'void0=dead_function\(void\)')
54 list(APPEND cflags -D'__Pyx_check_single_interpreter\(ARG\)=ARG \#\# 0') 59@@ -89,14 +80,8 @@ function(distutils_install_cython_module name)
55@@ -86,14 +77,8 @@ function(distutils_install_cython_module name)
56 set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\") 60 set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
57 61
58 set(options --prefix=${CMAKE_INSTALL_PREFIX}) 62 set(options --prefix=${CMAKE_INSTALL_PREFIX})
@@ -70,7 +74,7 @@ index 5697dff..de3cd57 100644
70 COMMAND 74 COMMAND
71 ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py 75 ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
72diff --git a/cmake/modules/FindRocksDB.cmake b/cmake/modules/FindRocksDB.cmake 76diff --git a/cmake/modules/FindRocksDB.cmake b/cmake/modules/FindRocksDB.cmake
73index 9818433..be38597 100644 77index c5dd3df..be38597 100644
74--- a/cmake/modules/FindRocksDB.cmake 78--- a/cmake/modules/FindRocksDB.cmake
75+++ b/cmake/modules/FindRocksDB.cmake 79+++ b/cmake/modules/FindRocksDB.cmake
76@@ -9,9 +9,9 @@ 80@@ -9,9 +9,9 @@
@@ -85,15 +89,6 @@ index 9818433..be38597 100644
85 89
86 if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") 90 if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h")
87 foreach(ver "MAJOR" "MINOR" "PATCH") 91 foreach(ver "MAJOR" "MINOR" "PATCH")
88@@ -40,7 +40,7 @@ if(RocksDB_FOUND)
89 set_target_properties(RocksDB::RocksDB PROPERTIES
90 INTERFACE_INCLUDE_DIRECTORIES "${ROCKSDB_INCLUDE_DIR}"
91 IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
92- IMPORTED_LOCATION "${ROCKSDB_LIBRARY}"
93+ IMPORTED_LOCATION "${ROCKSDB_LIBRARIES}"
94 VERSION "${ROCKSDB_VERSION_STRING}")
95 endif()
96 endif()
97diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt 92diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt
98index 76709bb..95bba4a 100644 93index 76709bb..95bba4a 100644
99--- a/src/compressor/zstd/CMakeLists.txt 94--- a/src/compressor/zstd/CMakeLists.txt
diff --git a/recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch b/recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch
new file mode 100644
index 00000000..b7a9dd96
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch
@@ -0,0 +1,58 @@
1From f1651b8c509d60787d10c4115e29fecfd2da237c Mon Sep 17 00:00:00 2001
2From: Casey Bodley <cbodley@redhat.com>
3Date: Tue, 23 Apr 2019 15:41:45 -0400
4Subject: [PATCH] rgw: add executor type for basic_waitable_timers
5
6as of boost 1.70, the timer no longer depends on io_context directly,
7so we have to specify its executor as a template parameter
8
9Signed-off-by: Casey Bodley <cbodley@redhat.com>
10
11Upstream-Status: Backport [f1651b8c509d60787d10c4115e29fecfd2da237c]
12
13Signed-off-by: He Zhe <zhe.he@windriver.com>
14---
15 src/rgw/rgw_dmclock_async_scheduler.h | 5 +++++
16 src/rgw/rgw_reshard.h | 9 ++++++++-
17 2 files changed, 13 insertions(+), 1 deletion(-)
18
19diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h
20index 70487a5253..1d454acd2e 100644
21--- a/src/rgw/rgw_dmclock_async_scheduler.h
22+++ b/src/rgw/rgw_dmclock_async_scheduler.h
23@@ -82,7 +82,12 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler {
24 using Completion = async::Completion<Signature, async::AsBase<Request>>;
25
26 using Clock = ceph::coarse_real_clock;
27+#if BOOST_VERSION < 107000
28 using Timer = boost::asio::basic_waitable_timer<Clock>;
29+#else
30+ using Timer = boost::asio::basic_waitable_timer<Clock,
31+ boost::asio::wait_traits<Clock>, executor_type>;
32+#endif
33 Timer timer; //< timer for the next scheduled request
34
35 CephContext *const cct;
36diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h
37index d99a6ff68d..213fc238d2 100644
38--- a/src/rgw/rgw_reshard.h
39+++ b/src/rgw/rgw_reshard.h
40@@ -183,7 +183,14 @@ class RGWReshardWait {
41 ceph::condition_variable cond;
42
43 struct Waiter : boost::intrusive::list_base_hook<> {
44- boost::asio::basic_waitable_timer<Clock> timer;
45+#if BOOST_VERSION < 107000
46+ using Timer = boost::asio::basic_waitable_timer<Clock>;
47+#else
48+ using Executor = boost::asio::io_context::executor_type;
49+ using Timer = boost::asio::basic_waitable_timer<Clock,
50+ boost::asio::wait_traits<Clock>, Executor>;
51+#endif
52+ Timer timer;
53 explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {}
54 };
55 boost::intrusive::list<Waiter> waiters;
56--
572.21.0
58
diff --git a/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch b/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch
new file mode 100644
index 00000000..7a44338b
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch
@@ -0,0 +1,61 @@
1From 064f142746ae97f54865069cdacf5aae2b1b14f6 Mon Sep 17 00:00:00 2001
2From: Casey Bodley <cbodley@redhat.com>
3Date: Tue, 23 Apr 2019 15:40:01 -0400
4Subject: [PATCH] rgw: beast handle_connection() takes io_context
5
6as of boost 1.70, the socket no longer has a get_io_context(), so we
7have to pass it in as an argument
8
9Signed-off-by: Casey Bodley <cbodley@redhat.com>
10
11Upstream-Status: Backport [064f142746ae97f54865069cdacf5aae2b1b14f6]
12
13Signed-off-by: He Zhe <zhe.he@windriver.com>
14---
15 src/rgw/rgw_asio_frontend.cc | 9 +++++----
16 1 file changed, 5 insertions(+), 4 deletions(-)
17
18diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc
19index e4be074ec7..4af3695dc1 100644
20--- a/src/rgw/rgw_asio_frontend.cc
21+++ b/src/rgw/rgw_asio_frontend.cc
22@@ -81,7 +81,8 @@ class StreamIO : public rgw::asio::ClientIO {
23 using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>;
24
25 template <typename Stream>
26-void handle_connection(RGWProcessEnv& env, Stream& stream,
27+void handle_connection(boost::asio::io_context& context,
28+ RGWProcessEnv& env, Stream& stream,
29 boost::beast::flat_buffer& buffer, bool is_ssl,
30 SharedMutex& pause_mutex,
31 rgw::dmclock::Scheduler *scheduler,
32@@ -152,7 +153,7 @@ void handle_connection(RGWProcessEnv& env, Stream& stream,
33 rgw::io::add_conlen_controlling(
34 &real_client))));
35 RGWRestfulIO client(cct, &real_client_io);
36- auto y = optional_yield{socket.get_io_context(), yield};
37+ auto y = optional_yield{context, yield};
38 process_request(env.store, env.rest, &req, env.uri_prefix,
39 *env.auth_registry, &client, env.olog, y, scheduler);
40 }
41@@ -560,7 +561,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
42 return;
43 }
44 buffer.consume(bytes);
45- handle_connection(env, stream, buffer, true, pause_mutex,
46+ handle_connection(context, env, stream, buffer, true, pause_mutex,
47 scheduler.get(), ec, yield);
48 if (!ec) {
49 // ssl shutdown (ignoring errors)
50@@ -578,7 +579,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
51 auto c = connections.add(conn);
52 boost::beast::flat_buffer buffer;
53 boost::system::error_code ec;
54- handle_connection(env, s, buffer, false, pause_mutex,
55+ handle_connection(context, env, s, buffer, false, pause_mutex,
56 scheduler.get(), ec, yield);
57 s.shutdown(tcp::socket::shutdown_both, ec);
58 });
59--
602.21.0
61
diff --git a/recipes-extended/ceph/ceph_14.1.0.bb b/recipes-extended/ceph/ceph_14.2.3.bb
index 18a324a8..722efe39 100644
--- a/recipes-extended/ceph/ceph_14.1.0.bb
+++ b/recipes-extended/ceph/ceph_14.2.3.bb
@@ -11,9 +11,11 @@ inherit cmake pythonnative python-dir systemd
11SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ 11SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
12 file://0001-ceph-fix-build-errors-for-cross-compile.patch \ 12 file://0001-ceph-fix-build-errors-for-cross-compile.patch \
13 file://ceph.conf \ 13 file://ceph.conf \
14 file://0001-rgw-add-executor-type-for-basic_waitable_timers.patch \
15 file://0001-rgw-beast-handle_connection-takes-io_context.patch \
14" 16"
15SRC_URI[md5sum] = "67b53eeb0f241c3011e7f40925aa7e08" 17SRC_URI[md5sum] = "e4a53270fba14bf34d0b4c2a2340042e"
16SRC_URI[sha256sum] = "9ef726d7e73ce4d9510ad899493258374f1b40ba20a26b72bbbedb0bfb6dffd8" 18SRC_URI[sha256sum] = "63d0eddab80f7bcdd4e9ac86d2b36c6cc8c9e2d34f20e8e426ff1620d66748dd"
17 19
18DEPENDS = "boost bzip2 curl expat gperf-native \ 20DEPENDS = "boost bzip2 curl expat gperf-native \
19 keyutils libaio libibverbs lz4 \ 21 keyutils libaio libibverbs lz4 \