mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
ceph: update and make python3 safe
Updating the ceph version and making python2 -> python3 subsitutions. This has been build-only tested. We can drop one patch, since it is already part of this newer version. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
2ffc7a5a6f
commit
7e9c4e6a46
|
@ -1,61 +0,0 @@
|
|||
From 064f142746ae97f54865069cdacf5aae2b1b14f6 Mon Sep 17 00:00:00 2001
|
||||
From: Casey Bodley <cbodley@redhat.com>
|
||||
Date: Tue, 23 Apr 2019 15:40:01 -0400
|
||||
Subject: [PATCH] rgw: beast handle_connection() takes io_context
|
||||
|
||||
as of boost 1.70, the socket no longer has a get_io_context(), so we
|
||||
have to pass it in as an argument
|
||||
|
||||
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [064f142746ae97f54865069cdacf5aae2b1b14f6]
|
||||
|
||||
Signed-off-by: He Zhe <zhe.he@windriver.com>
|
||||
---
|
||||
src/rgw/rgw_asio_frontend.cc | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc
|
||||
index e4be074ec7..4af3695dc1 100644
|
||||
--- a/src/rgw/rgw_asio_frontend.cc
|
||||
+++ b/src/rgw/rgw_asio_frontend.cc
|
||||
@@ -81,7 +81,8 @@ class StreamIO : public rgw::asio::ClientIO {
|
||||
using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>;
|
||||
|
||||
template <typename Stream>
|
||||
-void handle_connection(RGWProcessEnv& env, Stream& stream,
|
||||
+void handle_connection(boost::asio::io_context& context,
|
||||
+ RGWProcessEnv& env, Stream& stream,
|
||||
boost::beast::flat_buffer& buffer, bool is_ssl,
|
||||
SharedMutex& pause_mutex,
|
||||
rgw::dmclock::Scheduler *scheduler,
|
||||
@@ -152,7 +153,7 @@ void handle_connection(RGWProcessEnv& env, Stream& stream,
|
||||
rgw::io::add_conlen_controlling(
|
||||
&real_client))));
|
||||
RGWRestfulIO client(cct, &real_client_io);
|
||||
- auto y = optional_yield{socket.get_io_context(), yield};
|
||||
+ auto y = optional_yield{context, yield};
|
||||
process_request(env.store, env.rest, &req, env.uri_prefix,
|
||||
*env.auth_registry, &client, env.olog, y, scheduler);
|
||||
}
|
||||
@@ -560,7 +561,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
|
||||
return;
|
||||
}
|
||||
buffer.consume(bytes);
|
||||
- handle_connection(env, stream, buffer, true, pause_mutex,
|
||||
+ handle_connection(context, env, stream, buffer, true, pause_mutex,
|
||||
scheduler.get(), ec, yield);
|
||||
if (!ec) {
|
||||
// ssl shutdown (ignoring errors)
|
||||
@@ -578,7 +579,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
|
||||
auto c = connections.add(conn);
|
||||
boost::beast::flat_buffer buffer;
|
||||
boost::system::error_code ec;
|
||||
- handle_connection(env, s, buffer, false, pause_mutex,
|
||||
+ handle_connection(context, env, s, buffer, false, pause_mutex,
|
||||
scheduler.get(), ec, yield);
|
||||
s.shutdown(tcp::socket::shutdown_both, ec);
|
||||
});
|
||||
--
|
||||
2.21.0
|
||||
|
|
@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24
|
|||
file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
file://COPYING;md5=601c21a554d728c3038ca292b83b8af0 \
|
||||
"
|
||||
inherit cmake pythonnative python-dir systemd
|
||||
inherit cmake python3native python3-dir systemd
|
||||
# Disable python pybind support for ceph temporary, when corss compiling pybind,
|
||||
# pybind mix cmake and python setup environment, would case a lot of errors.
|
||||
|
||||
|
@ -12,17 +12,17 @@ SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
|
|||
file://0001-ceph-fix-build-errors-for-cross-compile.patch \
|
||||
file://ceph.conf \
|
||||
file://0001-rgw-add-executor-type-for-basic_waitable_timers.patch \
|
||||
file://0001-rgw-beast-handle_connection-takes-io_context.patch \
|
||||
file://0001-common-rgw-workaround-for-boost-1.72.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "e4a53270fba14bf34d0b4c2a2340042e"
|
||||
SRC_URI[sha256sum] = "63d0eddab80f7bcdd4e9ac86d2b36c6cc8c9e2d34f20e8e426ff1620d66748dd"
|
||||
|
||||
SRC_URI[md5sum] = "10c22151123ce73b3fe49a6700fe24e0"
|
||||
SRC_URI[sha256sum] = "a1d20f2ba4e2d38a52f40e2e75e2ad136e78fa208b59348d3d45895cc4ca7e62"
|
||||
|
||||
DEPENDS = "boost bzip2 curl expat gperf-native \
|
||||
keyutils libaio libibverbs lz4 \
|
||||
nspr nss \
|
||||
oath openldap openssl \
|
||||
python python-cython-native rabbitmq-c rocksdb snappy udev \
|
||||
python3 python3-cython-native rabbitmq-c rocksdb snappy udev \
|
||||
valgrind xfsprogs zlib \
|
||||
"
|
||||
SYSTEMD_SERVICE_${PN} = " \
|
||||
|
@ -58,6 +58,8 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \
|
|||
-DWITH_SYSTEM_ROCKSDB=ON \
|
||||
-DWITH_RDMA=OFF \
|
||||
-DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
|
||||
-DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \
|
||||
-DPYTHON_EXECUTABLE=${PYTHON} \
|
||||
"
|
||||
|
||||
do_configure_prepend () {
|
||||
|
@ -67,10 +69,10 @@ do_configure_prepend () {
|
|||
}
|
||||
|
||||
do_install_append () {
|
||||
sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph
|
||||
sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph-crash
|
||||
sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph-volume
|
||||
sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph-volume-systemd
|
||||
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python:' ${D}${bindir}/ceph
|
||||
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python:' ${D}${bindir}/ceph-crash
|
||||
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python:' ${D}${bindir}/ceph-volume
|
||||
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python:' ${D}${bindir}/ceph-volume-systemd
|
||||
find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::'
|
||||
install -d ${D}${sysconfdir}/ceph
|
||||
install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/
|
||||
|
@ -116,10 +118,10 @@ FILES_${PN}-python = "\
|
|||
${PYTHON_SITEPACKAGES_DIR}/* \
|
||||
"
|
||||
RDEPENDS_${PN} += "\
|
||||
python \
|
||||
python-misc \
|
||||
python-modules \
|
||||
python-prettytable \
|
||||
python3 \
|
||||
python3-misc \
|
||||
python3-modules \
|
||||
python3-prettytable \
|
||||
${PN}-python \
|
||||
"
|
||||
COMPATIBLE_HOST = "(x86_64).*"
|
Loading…
Reference in New Issue
Block a user