Commit bf36b5f4 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Updated ceph to 16.2.4

parent 62e18750
...@@ -31,26 +31,24 @@ all: ceph-config ceph-sudoer ...@@ -31,26 +31,24 @@ all: ceph-config ceph-sudoer
mkdir ceph-home mkdir ceph-home
ln -s /lib /lib64 ln -s /lib /lib64
tar xf ceph-15.2.17.tar.gz tar xf ceph-16.2.4.tar.gz
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_v2_frame.patch patch -Np1 -d ceph-16.2.4 < ceph-16.2.4-fix_v2_frame.patch
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_cpu_detection.patch patch -Np1 -d ceph-16.2.4 < ceph-16.2.4-fix_tests.patch
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_tests.patch patch -Np1 -d ceph-16.2.4 < ceph-16.2.4-fix_pytest.patch
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_ceph-volume_systemd_unit.patch # patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_pip.patch
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-no_git.patch # patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-Cython_fix.patch
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_librbd_duplicate.patch # patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_mypy_with_python3.9.patch
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_ErasureCodeShec.patch # if [ `uname -m` = 'armv7l' ] ; then \
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-fix_pip.patch # patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-arm32_fix.patch ; \
if [ `uname -m` = 'armv7l' ] ; then \ # patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-arm32_fix_tests.patch ; \
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-arm32_fix.patch ; \ # fi
patch -Np1 -d ceph-15.2.17 < ceph-15.2.17-arm32_fix_tests.patch ; \ cd ceph-16.2.4 && HOME=$(CURDIR)/ceph-home ./do_cmake.sh -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LIBEXECDIR=/lib -DWITH_SPDK=OFF -DWITH_RDMA=OFF -DWITH_RADOSGW_AMQP_ENDPOINT=OFF -DALLOCATOR=tcmalloc_minimal
fi $(MAKE) -C ceph-16.2.4/build npm_config_cache=/build/.npm NODE_OPTIONS="--max-old-space-size=3072"
cd ceph-15.2.17 && HOME=$(CURDIR)/ceph-home ./do_cmake.sh -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LIBEXECDIR=/lib -DWITH_SPDK=OFF -DWITH_RDMA=OFF -DWITH_RADOSGW_AMQP_ENDPOINT=OFF -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DALLOCATOR=tcmalloc_minimal
$(MAKE) -C ceph-15.2.17/build npm_config_cache=/build/.npm NODE_OPTIONS="--max-old-space-size=3072"
hostname localhost hostname localhost
cd ceph-15.2.17 && tar xf ../ceph-object-corpus.tar.xz cd ceph-16.2.4 && tar xf ../ceph-object-corpus.tar.xz
cd ceph-15.2.17/build && HOME=$(CURDIR)/ceph-home CTEST_OUTPUT_ON_FAILURE=1 NODE_OPTIONS="--max-old-space-size=3072" VIRTUALENV_SYSTEM_SITE_PACKAGES=True SETUPTOOLS_USE_DISTUTILS=stdlib make check cd ceph-16.2.4/build && HOME=$(CURDIR)/ceph-home CTEST_OUTPUT_ON_FAILURE=1 NODE_OPTIONS="--max-old-space-size=3072" VIRTUALENV_SYSTEM_SITE_PACKAGES=True SETUPTOOLS_USE_DISTUTILS=stdlib make check
$(MAKE) -C ceph-15.2.17/build install $(MAKE) -C ceph-16.2.4/build install
rm /usr/bin/ceph_test* rm /usr/bin/ceph_test*
find / -name *.pyc -exec rm -f '{}' ';' find / -name *.pyc -exec rm -f '{}' ';'
find / -name *.js.map -exec rm -f '{}' ';' find / -name *.js.map -exec rm -f '{}' ';'
...@@ -78,7 +76,7 @@ all: ceph-config ceph-sudoer ...@@ -78,7 +76,7 @@ all: ceph-config ceph-sudoer
install -v -Dm755 ceph-mon-bootstrap /usr/sbin/ceph-mon-bootstrap install -v -Dm755 ceph-mon-bootstrap /usr/sbin/ceph-mon-bootstrap
ln -s ../dist /usr/share/ceph/mgr/dashboard/frontend/dist/en-US ln -s ../dist /usr/share/ceph/mgr/dashboard/frontend/dist/en-US
ln -s /usr/lib/python3.8/site-packages/ceph-1.0.0-py3.8.egg/ceph /usr/lib/python3.8/site-packages/ceph ln -s /usr/lib/python3.9/site-packages/ceph-1.0.0-py3.9.egg/ceph /usr/lib/python3.9/site-packages/ceph
@echo "$$CEPH_CONFIG" > /etc/config/ceph @echo "$$CEPH_CONFIG" > /etc/config/ceph
install -v -Dm755 ceph /usr/share/easycwmp/functions install -v -Dm755 ceph /usr/share/easycwmp/functions
...@@ -99,7 +97,7 @@ all: ceph-config ceph-sudoer ...@@ -99,7 +97,7 @@ all: ceph-config ceph-sudoer
swapoff swap swapoff swap
rm -rf swap rm -rf swap
rm -rf ceph-15.2.17 rm -rf ceph-16.2.4
ceph-config: ceph-config:
define CEPH_CONFIG define CEPH_CONFIG
......
diff -uNr ceph-15.2.17/src/client/Client.cc ceph-15.2.17-arm32_fix/src/client/Client.cc
--- ceph-15.2.17/src/client/Client.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/client/Client.cc 2023-03-08 16:31:26.123393869 +1030
@@ -11067,7 +11067,7 @@
ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " -> " << in->ll_ref << dendl;
}
-int Client::_ll_put(Inode *in, uint64_t num)
+int Client::_ll_put(Inode *in, size_t num)
{
in->ll_put(num);
ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " " << num << " -> " << in->ll_ref << dendl;
@@ -11108,7 +11108,7 @@
}
}
-bool Client::_ll_forget(Inode *in, uint64_t count)
+bool Client::_ll_forget(Inode *in, size_t count)
{
inodeno_t ino = in->ino;
@@ -11137,7 +11137,7 @@
return last;
}
-bool Client::ll_forget(Inode *in, uint64_t count)
+bool Client::ll_forget(Inode *in, size_t count)
{
std::lock_guard lock(client_lock);
return _ll_forget(in, count);
diff -uNr ceph-15.2.17/src/client/Client.h ceph-15.2.17-arm32_fix/src/client/Client.h
--- ceph-15.2.17/src/client/Client.h 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/client/Client.h 2023-03-08 16:31:26.124393871 +1030
@@ -484,7 +484,7 @@
int ll_lookupx(Inode *parent, const char *name, Inode **out,
struct ceph_statx *stx, unsigned want, unsigned flags,
const UserPerm& perms);
- bool ll_forget(Inode *in, uint64_t count);
+ bool ll_forget(Inode *in, size_t count);
bool ll_put(Inode *in);
int ll_get_snap_ref(snapid_t snap);
@@ -1032,7 +1032,7 @@
void _fragmap_remove_stopped_mds(Inode *in, mds_rank_t mds);
void _ll_get(Inode *in);
- int _ll_put(Inode *in, uint64_t num);
+ int _ll_put(Inode *in, size_t num);
void _ll_drop_pins();
Fh *_create_fh(Inode *in, int flags, int cmode, const UserPerm& perms);
@@ -1186,7 +1186,7 @@
int _lookup_parent(Inode *in, const UserPerm& perms, Inode **parent=NULL);
int _lookup_name(Inode *in, Inode *parent, const UserPerm& perms);
int _lookup_vino(vinodeno_t ino, const UserPerm& perms, Inode **inode=NULL);
- bool _ll_forget(Inode *in, uint64_t count);
+ bool _ll_forget(Inode *in, size_t count);
uint32_t deleg_timeout = 0;
diff -uNr ceph-15.2.17/src/client/fuse_ll.cc ceph-15.2.17-arm32_fix/src/client/fuse_ll.cc
--- ceph-15.2.17/src/client/fuse_ll.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/client/fuse_ll.cc 2023-03-08 16:31:26.125393874 +1030
@@ -192,7 +192,7 @@
}
static void fuse_ll_forget(fuse_req_t req, fuse_ino_t ino,
- long unsigned nlookup)
+ uint64_t nlookup)
{
CephFuse::Handle *cfuse = fuse_ll_req_prepare(req);
cfuse->client->ll_forget(cfuse->iget(ino), nlookup+1);
diff -uNr ceph-15.2.17/src/common/options.h ceph-15.2.17-arm32_fix/src/common/options.h
--- ceph-15.2.17/src/common/options.h 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/common/options.h 2023-03-08 16:31:26.126393877 +1030
@@ -35,7 +35,7 @@
case TYPE_ADDR: return "entity_addr_t";
case TYPE_ADDRVEC: return "entity_addrvec_t";
case TYPE_UUID: return "uuid_d";
- case TYPE_SIZE: return "size_t";
+ case TYPE_SIZE: return "uint64_t";
case TYPE_SECS: return "secs";
default: return "unknown";
}
@@ -121,7 +121,7 @@
};
struct size_t {
- std::size_t value;
+ std::uint64_t value;
operator uint64_t() const {
return static_cast<uint64_t>(value);
}
@@ -262,7 +262,7 @@
case TYPE_BOOL:
v = bool(new_value); break;
case TYPE_SIZE:
- v = size_t{static_cast<std::size_t>(new_value)}; break;
+ v = size_t{static_cast<std::uint64_t>(new_value)}; break;
case TYPE_SECS:
v = std::chrono::seconds{new_value}; break;
default:
diff -uNr ceph-15.2.17/src/librbd/object_map/DiffRequest.cc ceph-15.2.17-arm32_fix/src/librbd/object_map/DiffRequest.cc
--- ceph-15.2.17/src/librbd/object_map/DiffRequest.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/librbd/object_map/DiffRequest.cc 2023-03-08 16:31:26.126393877 +1030
@@ -175,7 +175,7 @@
m_object_map.resize(num_objs);
}
- size_t prev_object_diff_state_size = m_object_diff_state->size();
+ uint64_t prev_object_diff_state_size = m_object_diff_state->size();
if (prev_object_diff_state_size < num_objs) {
// the diff state should be the largest of all snapshots in the set
m_object_diff_state->resize(num_objs);
diff -uNr ceph-15.2.17/src/mds/PurgeQueue.h ceph-15.2.17-arm32_fix/src/mds/PurgeQueue.h
--- ceph-15.2.17/src/mds/PurgeQueue.h 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/mds/PurgeQueue.h 2023-03-08 16:31:26.126393877 +1030
@@ -219,6 +219,6 @@
size_t purge_item_journal_size;
uint64_t ops_high_water = 0;
- uint64_t files_high_water = 0;
+ size_t files_high_water = 0;
};
#endif
diff -uNr ceph-15.2.17/src/pybind/mgr/cephadm/module.py ceph-15.2.17-arm32_fix/src/pybind/mgr/cephadm/module.py
--- ceph-15.2.17/src/pybind/mgr/cephadm/module.py 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/pybind/mgr/cephadm/module.py 2023-03-08 16:31:26.127393879 +1030
@@ -342,7 +342,7 @@
raise RuntimeError("unable to read cephadm at '%s': %s" % (
path, str(e)))
- self._worker_pool = multiprocessing.pool.ThreadPool(10)
+ self._worker_pool = multiprocessing.pool.ThreadPool(3)
self._reconfig_ssh()
diff -uNr ceph-15.2.17/src/pybind/mgr/dashboard/frontend/package.json ceph-15.2.17-arm32_fix/src/pybind/mgr/dashboard/frontend/package.json
--- ceph-15.2.17/src/pybind/mgr/dashboard/frontend/package.json 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/pybind/mgr/dashboard/frontend/package.json 2023-03-08 16:32:29.560561162 +1030
@@ -121,7 +121,6 @@
"@types/node": "12.12.34",
"@types/simplebar": "5.1.1",
"codelyzer": "5.2.2",
- "cypress": "9.0.0",
"html-linter": "1.1.1",
"htmllint-cli": "0.0.7",
"jest": "25.5.4",
diff -uNr ceph-15.2.17/src/test/common/test_json_formattable.cc ceph-15.2.17-arm32_fix/src/test/common/test_json_formattable.cc
--- ceph-15.2.17/src/test/common/test_json_formattable.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/test/common/test_json_formattable.cc 2023-03-08 16:31:26.127393879 +1030
@@ -371,7 +371,7 @@
struct2() {
void *p = (void *)this;
- long i = (long)p;
+ unsigned long i = (unsigned long)p;
v.resize((i >> 16) % 16 + 1);
}
diff -uNr ceph-15.2.17/src/test/libcephfs/ceph_pthread_self.h ceph-15.2.17-arm32_fix/src/test/libcephfs/ceph_pthread_self.h
--- ceph-15.2.17/src/test/libcephfs/ceph_pthread_self.h 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/test/libcephfs/ceph_pthread_self.h 2023-03-08 16:31:26.127393879 +1030
@@ -25,7 +25,7 @@
static_assert(std::is_convertible_v<decltype(me), uint64_t> ||
std::is_pointer_v<decltype(me)>,
"we need to use pthread_self() for the owner parameter");
- return reinterpret_cast<uint64_t>(me);
+ return reinterpret_cast<uint64_t>((uint64_t) me);
}
#endif
diff -uNr ceph-15.2.17/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc ceph-15.2.17-arm32_fix/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc
--- ceph-15.2.17/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc 2023-03-08 16:31:26.128393882 +1030
@@ -162,7 +162,7 @@
int r) {
bufferlist bl;
encode(last_image_id, bl);
- encode(static_cast<size_t>(1024), bl);
+ encode(static_cast<uint64_t>(1024), bl);
bufferlist out_bl;
encode(images, out_bl);
diff -uNr ceph-15.2.17/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc ceph-15.2.17-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
--- ceph-15.2.17/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc 2023-03-08 16:31:26.128393882 +1030
@@ -253,7 +253,7 @@
json_spirit::mObject root_obj;
root_obj["replay_state"] = replay_state;
- root_obj["remote_snapshot_timestamp"] = remote_snap_info->timestamp.sec();
+ root_obj["remote_snapshot_timestamp"] = (uint64_t) remote_snap_info->timestamp.sec();
auto matching_remote_snap_id = util::compute_remote_snap_id(
m_state_builder->local_image_ctx->image_lock,
@@ -268,7 +268,7 @@
// the local snapshot would just be the time the snapshot was
// synced and not the consistency point in time.
root_obj["local_snapshot_timestamp"] =
- matching_remote_snap_it->second.timestamp.sec();
+ (uint64_t) matching_remote_snap_it->second.timestamp.sec();
}
matching_remote_snap_it = m_state_builder->remote_image_ctx->snap_info.find(
@@ -276,7 +276,7 @@
if (m_remote_snap_id_end != CEPH_NOSNAP &&
matching_remote_snap_it !=
m_state_builder->remote_image_ctx->snap_info.end()) {
- root_obj["syncing_snapshot_timestamp"] = remote_snap_info->timestamp.sec();
+ root_obj["syncing_snapshot_timestamp"] = (uint64_t) remote_snap_info->timestamp.sec();
root_obj["syncing_percent"] = static_cast<uint64_t>(
100 * m_local_mirror_snap_ns.last_copied_object_number /
static_cast<float>(std::max<uint64_t>(1U, m_local_object_count)));
This diff is collapsed.
diff -uNr ceph-15.2.17/src/erasure-code/shec/ErasureCodeShec.cc ceph-15.2.17-fix_ErasureCodeShec/src/erasure-code/shec/ErasureCodeShec.cc
--- ceph-15.2.17/src/erasure-code/shec/ErasureCodeShec.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-fix_ErasureCodeShec/src/erasure-code/shec/ErasureCodeShec.cc 2023-02-09 13:56:36.584666287 +1030
@@ -179,6 +179,10 @@
if (!decoded || !decoded->empty()){
return -EINVAL;
}
+ if (!want_to_read.empty() && chunks.empty()) {
+ // i need to get the blocksize from the first element of chunks
+ return -1;
+ }
have.reserve(chunks.size());
for (map<int, bufferlist>::const_iterator i = chunks.begin();
diff -uNr ceph-15.2.17/src/test/erasure-code/TestErasureCodeShec_arguments.cc ceph-15.2.17-fix_ErasureCodeShec/src/test/erasure-code/TestErasureCodeShec_arguments.cc
--- ceph-15.2.17/src/test/erasure-code/TestErasureCodeShec_arguments.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-fix_ErasureCodeShec/src/test/erasure-code/TestErasureCodeShec_arguments.cc 2023-02-09 13:56:36.584666287 +1030
@@ -323,7 +323,6 @@
EXPECT_EQ(-EIO, result);
EXPECT_EQ(0u, minimum_chunks.size());
EXPECT_EQ(-1, dresult);
- EXPECT_EQ(shec->get_chunk_count(), decoded.size());
if (result != -EIO || dresult != -1) {
++unexpected_count;
}
@@ -359,7 +358,6 @@
EXPECT_EQ(-EIO, result);
EXPECT_EQ(0u, minimum_chunks.size());
EXPECT_EQ(-1, dresult);
- EXPECT_EQ(shec->get_chunk_count(), decoded.size());
if (result != -EIO || dresult != -1) {
++unexpected_count;
}
diff -uNr ceph-15.2.17/cmake/modules/Distutils.cmake ceph-15.2.17-fix_ceph-volume_systemd_unit/cmake/modules/Distutils.cmake
--- ceph-15.2.17/cmake/modules/Distutils.cmake 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-fix_ceph-volume_systemd_unit/cmake/modules/Distutils.cmake 2023-02-09 14:00:05.956304924 +1030
@@ -25,9 +25,9 @@
list(APPEND options
--root=\$ENV{DESTDIR}
--single-version-externally-managed)
- if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
- list(APPEND options --install-script=${DU_INSTALL_SCRIPT})
- endif()
+ endif()
+ if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
+ list(APPEND options --install-script=${DU_INSTALL_SCRIPT})
endif()
execute_process(
COMMAND ${Python3_EXECUTABLE}
diff -uNr ceph-15.2.17/src/test/test_arch.cc ceph-15.2.17-fix_cpu_detection/src/test/test_arch.cc
--- ceph-15.2.17/src/test/test_arch.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-fix_cpu_detection/src/test/test_arch.cc 2023-02-09 14:02:28.419739481 +1030
@@ -69,7 +69,7 @@
expected = strstr(flags, " sse4_1 ") ? 1 : 0;
EXPECT_EQ(expected, ceph_arch_intel_sse41);
- expected = (strstr(flags, " sse3 ") || strstr(flags, " ssse3 ")) ? 1 : 0;
+ expected = (strstr(flags, " sse3 ") || strstr(flags, " ssse3 ") || strstr(flags, " pni ")) ? 1 : 0;
EXPECT_EQ(expected, ceph_arch_intel_sse3);
expected = strstr(flags, " ssse3 ") ? 1 : 0;
diff -uNr ceph-15.2.17/src/librbd/image/OpenRequest.cc ceph-15.2.17-fix_librbd_duplicate/src/librbd/image/OpenRequest.cc
--- ceph-15.2.17/src/librbd/image/OpenRequest.cc 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-fix_librbd_duplicate/src/librbd/image/OpenRequest.cc 2023-02-09 15:00:51.932398445 +1030
@@ -10,7 +10,7 @@
#include "librbd/Utils.h"
#include "librbd/cache/ObjectCacherObjectDispatch.h"
#include "librbd/cache/WriteAroundObjectDispatch.h"
-#include "librbd/cache/ParentCacheObjectDispatch.cc"
+#include "librbd/cache/ParentCacheObjectDispatch.h"
#include "librbd/image/CloseRequest.h"
#include "librbd/image/RefreshRequest.h"
#include "librbd/image/SetSnapRequest.h"
diff -uNr ceph-15.2.17/src/tools/setup-virtualenv.sh ceph-15.2.17-fix_pip/src/tools/setup-virtualenv.sh
--- ceph-15.2.17/src/tools/setup-virtualenv.sh 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-fix_pip/src/tools/setup-virtualenv.sh 2023-02-09 16:30:01.085679996 +1030
@@ -66,17 +66,10 @@
DISABLE_PIP_VERSION_CHECK=
fi
-if pip --help | grep -q use-feature; then
- USE_FEATURE=--use-feature=2020-resolver
-else
- USE_FEATURE=
-fi
-
# older versions of pip will not install wrap_console scripts
# when using wheel packages
pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install \
- $USE_FEATURE \
- --upgrade 'pip >= 6.1'
+ --upgrade 'pip >= 6.1'
if pip --help | grep -q disable-pip-version-check; then
DISABLE_PIP_VERSION_CHECK=--disable-pip-version-check
@@ -89,7 +82,6 @@
fi
pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install \
- $USE_FEATURE \
$NO_INDEX \
--find-links=file://$(pwd)/wheelhouse 'tox >=2.9.1'
@@ -103,7 +95,6 @@
NO_INDEX=''
fi
pip --exists-action i $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install \
- $USE_FEATURE \
$NO_INDEX \
--find-links=file://$(pwd)/wheelhouse $require $constraint
fi
diff -uNr ceph-15.2.17/do_cmake.sh ceph-15.2.17-no_git/do_cmake.sh
--- ceph-15.2.17/do_cmake.sh 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-no_git/do_cmake.sh 2023-02-09 16:58:21.280846524 +1030
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
set -ex
-git submodule update --init --recursive
+if [ -d .git ]; then
+ git submodule update --init --recursive
+fi
: ${BUILD_DIR:=build}
: ${CEPH_GIT_DIR:=..}
diff -uNr ceph-15.2.17/src/test/CMakeLists.txt ceph-15.2.17-skip_promtool_tests/src/test/CMakeLists.txt
--- ceph-15.2.17/src/test/CMakeLists.txt 2022-08-10 02:37:01.000000000 +0930
+++ ceph-15.2.17-skip_promtool_tests/src/test/CMakeLists.txt 2023-02-09 17:00:53.027307163 +1030
@@ -531,24 +531,6 @@
add_ceph_test(smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/smoke.sh)
-find_program(PROMTOOL_EXECUTABLE promtool)
-if(PROMTOOL_EXECUTABLE)
- execute_process(
- COMMAND ${PROMTOOL_EXECUTABLE} test rules /dev/null
- RESULT_VARIABLE rc
- OUTPUT_QUIET)
- if(NOT rc)
- add_ceph_test(run-promtool-unittests
- ${PROMTOOL_EXECUTABLE} test rules ${CMAKE_SOURCE_DIR}/monitoring/prometheus/alerts/test_alerts.yml)
- else()
- message(WARNING "'${PROMTOOL_EXECUTABLE} test rules' does not work, "
- "please use a newer prometheus")
- endif()
-else()
- add_ceph_test(run-promtool-unittests
- {CMAKE_CURRENT_SOURCE_DIR}/run-promtool-unittests.sh)
-endif()
-
set_property(
TEST ${tox_tests}
PROPERTY ENVIRONMENT ${env_vars_for_tox_tests})
diff -uNr ceph-16.2.4/qa/tox.ini ceph-16.2.4-fix_pytest/qa/tox.ini
--- ceph-16.2.4/qa/tox.ini 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/qa/tox.ini 2024-09-24 13:59:41.362487944 +1000
@@ -5,7 +5,7 @@
[testenv:flake8]
basepython = python3
deps=
- flake8
+ flake8==3.9.0
commands=flake8 --select=F,E9 --exclude=venv,.tox
[testenv:mypy]
diff -uNr ceph-16.2.4/src/cephadm/tox.ini ceph-16.2.4-fix_pytest/src/cephadm/tox.ini
--- ceph-16.2.4/src/cephadm/tox.ini 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/cephadm/tox.ini 2024-09-24 13:59:41.364487903 +1000
@@ -20,7 +20,7 @@
[testenv]
skip_install=true
deps =
- pytest
+ pytest<6
mock
commands=pytest {posargs}
@@ -32,7 +32,7 @@
[testenv:flake8]
basepython = python3
deps =
- flake8
+ flake8==3.9.0
flake8-quotes
commands =
flake8 --config=tox.ini {posargs:cephadm}
diff -uNr ceph-16.2.4/src/ceph-volume/plugin/zfs/tox.ini ceph-16.2.4-fix_pytest/src/ceph-volume/plugin/zfs/tox.ini
--- ceph-16.2.4/src/ceph-volume/plugin/zfs/tox.ini 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/ceph-volume/plugin/zfs/tox.ini 2024-09-24 13:59:41.365487883 +1000
@@ -10,7 +10,7 @@
[testenv:flake8]
basepython = python
-deps = flake8
+deps = flake8==3.9.0
commands = flake8
[testenv]
diff -uNr ceph-16.2.4/src/ceph-volume/tox.ini ceph-16.2.4-fix_pytest/src/ceph-volume/tox.ini
--- ceph-16.2.4/src/ceph-volume/tox.ini 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/ceph-volume/tox.ini 2024-09-24 13:59:41.365487883 +1000
@@ -4,13 +4,13 @@
[testenv]
deps=
- pytest
+ pytest<6
mock
install_command=./tox_install_command.sh {opts} {packages}
commands=py.test -v {posargs:ceph_volume/tests} --ignore=ceph_volume/tests/functional
[testenv:py3-flake8]
-deps=flake8
+deps=flake8==3.9.0
commands=flake8 {posargs:ceph_volume}
[tool:pytest]
diff -uNr ceph-16.2.4/src/pybind/mgr/dashboard/requirements-lint.txt ceph-16.2.4-fix_pytest/src/pybind/mgr/dashboard/requirements-lint.txt
--- ceph-16.2.4/src/pybind/mgr/dashboard/requirements-lint.txt 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/pybind/mgr/dashboard/requirements-lint.txt 2024-09-24 13:59:41.366487862 +1000
@@ -8,4 +8,4 @@
autopep8
pyfakefs
isort==5.5.3
-pytest
+pytest >=2.1.3,<6
diff -uNr ceph-16.2.4/src/pybind/mgr/dashboard/requirements-test.txt ceph-16.2.4-fix_pytest/src/pybind/mgr/dashboard/requirements-test.txt
--- ceph-16.2.4/src/pybind/mgr/dashboard/requirements-test.txt 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/pybind/mgr/dashboard/requirements-test.txt 2024-09-24 13:59:41.366487862 +1000
@@ -1,4 +1,4 @@
-pytest
+pytest >=2.1.3,<6
pytest-cov
pytest-instafail
pyfakefs
diff -uNr ceph-16.2.4/src/pybind/mgr/mgr_util.py ceph-16.2.4-fix_pytest/src/pybind/mgr/mgr_util.py
--- ceph-16.2.4/src/pybind/mgr/mgr_util.py 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/pybind/mgr/mgr_util.py 2024-09-24 14:00:12.341854849 +1000
@@ -467,7 +467,7 @@
# type: (str) -> None
from OpenSSL import crypto
try:
- x509 = crypto.load_certificate(crypto.FILETYPE_PEM, crt)
+ x509 = crypto.load_certificate(crypto.FILETYPE_PEM, crt.encode("utf-8"))
if x509.has_expired():
logger.warning('Certificate has expired: {}'.format(crt))
except (ValueError, crypto.Error) as e:
@@ -504,7 +504,7 @@
raise ServerConfigException(
'Invalid private key: {}'.format(str(e)))
try:
- _crt = crypto.load_certificate(crypto.FILETYPE_PEM, crt)
+ _crt = crypto.load_certificate(crypto.FILETYPE_PEM, crt.encode("utf-8"))
except ValueError as e:
raise ServerConfigException(
'Invalid certificate key: {}'.format(str(e))
diff -uNr ceph-16.2.4/src/pybind/mgr/requirements.txt ceph-16.2.4-fix_pytest/src/pybind/mgr/requirements.txt
--- ceph-16.2.4/src/pybind/mgr/requirements.txt 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/pybind/mgr/requirements.txt 2024-09-24 13:31:37.284033134 +1000
@@ -9,3 +9,4 @@
remoto
Jinja2
pyfakefs
+pytest<6
diff -uNr ceph-16.2.4/src/pybind/mgr/rook/rook-client-python/requirements.txt ceph-16.2.4-fix_pytest/src/pybind/mgr/rook/rook-client-python/requirements.txt
--- ceph-16.2.4/src/pybind/mgr/rook/rook-client-python/requirements.txt 2020-02-12 01:40:28.000000000 +1100
+++ ceph-16.2.4-fix_pytest/src/pybind/mgr/rook/rook-client-python/requirements.txt 2024-09-24 13:59:41.367487842 +1000
@@ -1,4 +1,4 @@
-pytest
+pytest >=2.1.3,<6
requests
pyyaml
markdown
diff -uNr ceph-16.2.4/src/pybind/mgr/snap_schedule/requirements.txt ceph-16.2.4-fix_pytest/src/pybind/mgr/snap_schedule/requirements.txt
--- ceph-16.2.4/src/pybind/mgr/snap_schedule/requirements.txt 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/pybind/mgr/snap_schedule/requirements.txt 2024-09-24 13:59:41.367487842 +1000
@@ -1 +1 @@
-pytest
+pytest >=2.1.3,<6
diff -uNr ceph-16.2.4/src/pybind/mgr/snap_schedule/tox.ini ceph-16.2.4-fix_pytest/src/pybind/mgr/snap_schedule/tox.ini
--- ceph-16.2.4/src/pybind/mgr/snap_schedule/tox.ini 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/pybind/mgr/snap_schedule/tox.ini 2024-09-24 13:59:41.368487821 +1000
@@ -12,7 +12,7 @@
py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3:{toxinidir}
SNAP_SCHED_UNITTEST = true
deps =
- pytest
+ pytest<6
mock
py27: pathlib
commands=
diff -uNr ceph-16.2.4/src/pybind/mgr/tox.ini ceph-16.2.4-fix_pytest/src/pybind/mgr/tox.ini
--- ceph-16.2.4/src/pybind/mgr/tox.ini 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/pybind/mgr/tox.ini 2024-09-24 14:22:16.007390285 +1000
@@ -94,11 +94,6 @@
[testenv:flake8]
basepython = python3
deps =
- flake8
-modules =
- cephadm
- orchestrator
- prometheus
+ flake8==3.9.0
commands =
- flake8 --config=tox.ini {posargs} \
- {posargs:{[testenv:flake8]modules}}
+ flake8 --config=tox.ini cephadm/ orchestrator/ prometheus/
diff -uNr ceph-16.2.4/src/python-common/requirements.txt ceph-16.2.4-fix_pytest/src/python-common/requirements.txt
--- ceph-16.2.4/src/python-common/requirements.txt 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/python-common/requirements.txt 2024-09-24 13:59:41.369487801 +1000
@@ -2,6 +2,6 @@
mock; python_version < '3.3'
mypy==0.790; python_version >= '3'
pytest-mypy; python_version >= '3'
-pytest >= 2.1.3; python_version >= '3'
+pytest >=2.1.3,<6; python_version >= '3'
pyyaml
typing-extensions; python_version < '3.8'
diff -uNr ceph-16.2.4/src/tools/cephfs/top/tox.ini ceph-16.2.4-fix_pytest/src/tools/cephfs/top/tox.ini
--- ceph-16.2.4/src/tools/cephfs/top/tox.ini 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/tools/cephfs/top/tox.ini 2024-09-24 13:59:41.369487801 +1000
@@ -3,5 +3,5 @@
skipsdist = true
[testenv:py3]
-deps = flake8
+deps = flake8==3.9.0
commands = flake8 --ignore=W503 --max-line-length=100 cephfs-top
diff -uNr ceph-16.2.4/src/tools/cephfs/tox.ini ceph-16.2.4-fix_pytest/src/tools/cephfs/tox.ini
--- ceph-16.2.4/src/tools/cephfs/tox.ini 2021-05-14 03:20:27.000000000 +1000
+++ ceph-16.2.4-fix_pytest/src/tools/cephfs/tox.ini 2024-09-24 13:59:41.370487781 +1000
@@ -3,5 +3,5 @@
skipsdist = true
[testenv:py3]
-deps = flake8
+deps = flake8=3.9.0
commands = flake8 --ignore=W503 --max-line-length=100 cephfs-shell
diff -uNr ceph-15.2.17/src/msg/async/frames_v2.h ceph-15.2.17-fix_v2_frame/src/msg/async/frames_v2.h diff -uNr ceph-16.2.4/src/msg/async/frames_v2.h ceph-16.2.4-fix_v2_frame/src/msg/async/frames_v2.h
--- ceph-15.2.17/src/msg/async/frames_v2.h 2022-08-10 02:37:01.000000000 +0930 --- ceph-16.2.4/src/msg/async/frames_v2.h 2021-05-14 03:20:27.000000000 +1000
+++ ceph-15.2.17-fix_v2_frame/src/msg/async/frames_v2.h 2023-02-09 16:54:21.975120094 +1030 +++ ceph-16.2.4-fix_v2_frame/src/msg/async/frames_v2.h 2024-09-06 21:37:42.973891799 +1000
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
// We need them because of the rx_buffers zero-copy optimization. // We need them because of the rx_buffers zero-copy optimization.
static constexpr __u16 PAGE_SIZE_ALIGNMENT = 4096; static constexpr __u16 PAGE_SIZE_ALIGNMENT = 4096;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment