删除ceph-16.2.7版本相关文件

Signed-off-by: wangzengliang1 <wangzengliang2@huawei.com>
This commit is contained in:
wangzengliang1 2024-01-30 14:33:26 +08:00
parent c5a732a218
commit c84338fed8
25 changed files with 5 additions and 51886 deletions

View File

@ -1,24 +0,0 @@
From f22ee023ad92b34697c743936451731c0ad4dbb6 Mon Sep 17 00:00:00 2001
From: liuqinfei <18138800392@163.com>
Date: Thu, 30 Dec 2021 09:46:33 +0800
Subject: [PATCH] fix error: 'transform' is not a member of 'std'
---
src/common/Formatter.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/common/Formatter.cc b/src/common/Formatter.cc
index 362deffb5ab..4e9838e3a36 100644
--- a/src/common/Formatter.cc
+++ b/src/common/Formatter.cc
@@ -18,6 +18,7 @@
#include "common/escape.h"
#include "include/buffer.h"
+#include <algorithm>
#include <fmt/format.h>
#include <algorithm>
#include <set>
--
2.30.0

View File

@ -1,25 +0,0 @@
From 73d7c0e9c106d6a6aeda0491a426e8f458e0cb13 Mon Sep 17 00:00:00 2001
From: liuqinfei <18138800392@163.com>
Date: Thu, 30 Dec 2021 11:48:33 +0800
Subject: [PATCH 2/2] enable install deps in openEuler
---
install-deps.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/install-deps.sh b/install-deps.sh
index 3ba5e47ff58..b35013607e4 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -337,7 +337,7 @@ else
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove ceph-build-deps
if [ "$control" != "debian/control" ] ; then rm $control; fi
;;
- centos|fedora|rhel|ol|virtuozzo)
+ centos|fedora|rhel|ol|virtuozzo|openEuler)
builddepcmd="dnf -y builddep --allowerasing"
echo "Using dnf to install dependencies"
case "$ID" in
--
2.30.0

File diff suppressed because it is too large Load Diff

View File

@ -1,57 +0,0 @@
From a13d33c47c0e713429f7cfbd6106a497838f6396 Mon Sep 17 00:00:00 2001
From: wangzengliang <wangzengliang1@huawei.com>
Date: Fri, 8 Apr 2022 11:35:38 +0800
Subject: [PATCH] cmake: add support python 3.10
---
cmake/modules/BuildBoost.cmake | 2 +-
cmake/modules/FindPython/Support.cmake | 2 +-
src/boost/libs/python/src/exec.cpp | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
index 468ae419c..320c2dcd5 100644
--- a/cmake/modules/BuildBoost.cmake
+++ b/cmake/modules/BuildBoost.cmake
@@ -70,7 +70,7 @@ function(do_build_boost version)
if(c MATCHES "^python([0-9])\$")
set(with_python_version "${CMAKE_MATCH_1}")
list(APPEND boost_with_libs "python")
- elseif(c MATCHES "^python([0-9])\\.?([0-9])\$")
+ elseif(c MATCHES "^python([0-9])\\.?([0-9]+)\$")
set(with_python_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
list(APPEND boost_with_libs "python")
else()
diff --git a/cmake/modules/FindPython/Support.cmake b/cmake/modules/FindPython/Support.cmake
index c05bbe330..fb362bfe2 100644
--- a/cmake/modules/FindPython/Support.cmake
+++ b/cmake/modules/FindPython/Support.cmake
@@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
endif()
if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
- set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+ set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
else()
diff --git a/src/boost/libs/python/src/exec.cpp b/src/boost/libs/python/src/exec.cpp
index 171c6f418..caa7d0864 100644
--- a/src/boost/libs/python/src/exec.cpp
+++ b/src/boost/libs/python/src/exec.cpp
@@ -106,10 +106,10 @@ object BOOST_PYTHON_DECL exec_file(char const *filename, object global, object l
char *f = const_cast<char *>(filename);
// Let python open the file to avoid potential binary incompatibilities.
#if PY_VERSION_HEX >= 0x03040000
- FILE *fs = _Py_fopen(f, "r");
+ FILE *fs = fopen(f, "r");
#elif PY_VERSION_HEX >= 0x03000000
PyObject *fo = Py_BuildValue("s", f);
- FILE *fs = _Py_fopen(fo, "r");
+ FILE *fs = fopen(fo, "r");
Py_DECREF(fo);
#else
PyObject *pyfile = PyFile_FromString(f, const_cast<char*>("r"));
--
2.30.0

View File

@ -1,40 +0,0 @@
From 9780d28028a40ecbfc327dab779e8a37c9aaed51 Mon Sep 17 00:00:00 2001
From: Guillaume Abrioux <gabrioux@redhat.com>
Date: Mon, 8 Mar 2021 09:59:26 +0100
Subject: [PATCH] ceph-volume: `get_first_*()` refactor
As indicated by commit 17957d9beb42a04b8f180ccb7ba07d43179a41d3 those
fuctions were meant to avoid writing something like following:
```
lvs = get_lvs()
if len(lvs) >= 1:
lvs = lv[0]
```
Those functions should return `None` if 0 or more than 1 item is returned.
The current name of these functions are confusing and can lead to thinking that
we just want the first item returned, even though it returns more than 1
item, let's rename them to `get_single_pv()`, `get_single_vg()` and
`get_single_lv()`
Closes: https://tracker.ceph.com/issues/49643
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a5e4216b49704783c55fb83b3ae6dde35b0082ad)
---
src/ceph-volume/ceph_volume/api/lvm.py | 54 +++--
diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py
index e5551206e16..bbafa06831b 100644
--- a/src/ceph-volume/ceph_volume/api/lvm.py
+++ b/src/ceph-volume/ceph_volume/api/lvm.py
@@ -1144,7 +1144,7 @@ def get_lv_by_fullname(full_name):
"""
try:
vg_name, lv_name = full_name.split('/')
- res_lv = get_first_lv(filters={'lv_name': lv_name,
+ res_lv = get_single_lv(filters={'lv_name': lv_name,
'vg_name': vg_name})
except ValueError:
res_lv = None

View File

@ -1,66 +0,0 @@
From 1a38ea3b96dbe8fd2f2fca8ee9a501ef1423027f Mon Sep 17 00:00:00 2001
From: Guillaume Abrioux <gabrioux@redhat.com>
Date: Mon, 20 Jun 2022 13:43:43 +0200
Subject: [PATCH] ceph-volume: decrease number of `pvs` calls in `lvm list`
current implementation of `List.create_report()` implies a lot of calls
to `pvs` process. This could be avoided.
current implementation:
```
>>> import timeit
>>> from ceph_volume.devices.lvm.listing import List
>>> timeit.timeit(List([]).main, number=1000)
...
93.03700458299136
```
new implementation:
```
>>> import timeit
>>> from ceph_volume.devices.lvm.listing import List
>>> timeit.timeit(List([]).main, number=1000)
...
62.16391600697534
```
In this example, it improves performance by ~30%
Fixes: https://tracker.ceph.com/issues/56127
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
---
src/ceph-volume/ceph_volume/devices/lvm/listing.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/ceph-volume/ceph_volume/devices/lvm/listing.py b/src/ceph-volume/ceph_volume/devices/lvm/listing.py
index 44d5063ce37..c16afdaa767 100644
--- a/src/ceph-volume/ceph_volume/devices/lvm/listing.py
+++ b/src/ceph-volume/ceph_volume/devices/lvm/listing.py
@@ -101,6 +101,8 @@ class List(object):
report = {}
+ pvs = api.get_pvs()
+
for lv in lvs:
if not api.is_ceph_device(lv):
continue
@@ -109,8 +111,7 @@ class List(object):
report.setdefault(osd_id, [])
lv_report = lv.as_dict()
- pvs = api.get_pvs(filters={'lv_uuid': lv.lv_uuid})
- lv_report['devices'] = [pv.name for pv in pvs] if pvs else []
+ lv_report['devices'] = [pv.name for pv in pvs if pv.lv_uuid == lv.lv_uuid] if pvs else []
report[osd_id].append(lv_report)
phys_devs = self.create_report_non_lv_device(lv)
--
2.33.0

View File

@ -1,43 +0,0 @@
From 7672ceb4f09c81ee7a2d5e8672e2c402c3206b4e Mon Sep 17 00:00:00 2001
From: luo rixin <luorixin@huawei.com>
Date: Wed, 14 Sep 2022 19:50:01 +0800
Subject: [PATCH] os/bluestore: use direct write in
BlueStore::_write_bdev_label
On AArch64 with kernel page size 64K, it occurs occasionally
"OSD::init(): unable to read osd superblock" when deploying osd.
As bluestore use direct write to write the superblock at 0x2000~1000
and BlueStore::_write_bdev_label use buffer write to write label at
0x0~1000, The OS flush the buffer write algined to page size, it will
overwrite the superblock(0x2000~1000). Use driect write to avoid
overwriting the superblock.
Fixes: https://tracker.ceph.com/issues/57537
Signed-off-by: luo rixin <luorixin@huawei.com>
---
src/os/bluestore/BlueStore.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc
index 8b893be79d1..534fe780f27 100644
--- a/src/os/bluestore/BlueStore.cc
+++ b/src/os/bluestore/BlueStore.cc
@@ -5104,13 +5104,14 @@ int BlueStore::_write_bdev_label(CephContext *cct,
z.zero();
bl.append(std::move(z));
- int fd = TEMP_FAILURE_RETRY(::open(path.c_str(), O_WRONLY|O_CLOEXEC));
+ int fd = TEMP_FAILURE_RETRY(::open(path.c_str(), O_WRONLY|O_CLOEXEC|O_DIRECT));
if (fd < 0) {
fd = -errno;
derr << __func__ << " failed to open " << path << ": " << cpp_strerror(fd)
<< dendl;
return fd;
}
+ bl.rebuild_aligned_size_and_memory(BDEV_LABEL_BLOCK_SIZE, BDEV_LABEL_BLOCK_SIZE, IOV_MAX);
int r = bl.write_fd(fd);
if (r < 0) {
derr << __func__ << " failed to write to " << path
--
2.20.1.windows.1

View File

@ -1,11 +0,0 @@
--- ceph-ori/cmake/modules/CheckCxxAtomic.cmake 2023-08-21 20:20:31.009088704 +0800
+++ ceph-16.2.7/cmake/modules/CheckCxxAtomic.cmake 2023-08-21 20:20:53.629126721 +0800
@@ -11,7 +11,7 @@ function(check_cxx_atomics var)
#include <atomic>
#include <cstdint>
-#if __s390x__
+#if defined(__s390x__) || defined(__sw_64__)
// Boost needs 16-byte atomics for tagged pointers.
// These are implemented via inline instructions on the platform
// if 16-byte alignment can be proven, and are delegated to libatomic

View File

@ -1,146 +0,0 @@
From dc4d69d6d10cf1748bbdf971cd118db334991697 Mon Sep 17 00:00:00 2001
From: Kotresh HR <khiremat@redhat.com>
Date: Sat, 8 Oct 2022 14:56:08 +0800
Subject: [PATCH] fix CVE-2022-0670
Fixes the subvolume discover to use the correct
metadata file after an upgrade from legacy subvolume
to v1. The fix makes sure, it doesn't use the
handcrafted metadata file placed in the subvolume
root of legacy subvolume.
Co-authored-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Co-authored-by: Dan van der Ster <daniel.vanderster@cern.ch>
Co-authored-by: Ramana Raja <rraja@redhat.com>
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 7eba9cab6cfb9a13a84062177d7a0fa228311e13)
(cherry picked from commit f8c04135150a7fb3c43607b43a8214e0d57547bc)
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 5bb46ee690591411d4890b613c6380fced9d04b4)
---
.../operations/versions/metadata_manager.py | 17 +++++++++++---
.../fs/operations/versions/subvolume_base.py | 23 +++++++++++++++++--
.../fs/operations/versions/subvolume_v1.py | 2 +-
3 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py b/src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py
index 1b6c43278..cb3059e56 100644
--- a/src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py
+++ b/src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py
@@ -40,16 +40,17 @@ class MetadataManager(object):
def refresh(self):
fd = None
conf_data = StringIO()
+ log.debug("opening config {0}".format(self.config_path))
try:
- log.debug("opening config {0}".format(self.config_path))
fd = self.fs.open(self.config_path, os.O_RDONLY)
while True:
data = self.fs.read(fd, -1, MetadataManager.MAX_IO_BYTES)
if not len(data):
break
conf_data.write(data.decode('utf-8'))
- conf_data.seek(0)
- self.config.readfp(conf_data)
+ except UnicodeDecodeError:
+ raise MetadataMgrException(-errno.EINVAL,
+ "failed to decode, erroneous metadata config '{0}'".format(self.config_path))
except cephfs.ObjectNotFound:
raise MetadataMgrException(-errno.ENOENT, "metadata config '{0}' not found".format(self.config_path))
except cephfs.Error as e:
@@ -58,6 +59,16 @@ class MetadataManager(object):
if fd is not None:
self.fs.close(fd)
+ conf_data.seek(0)
+ try:
+ if sys.version_info >= (3, 2):
+ self.config.read_file(conf_data)
+ else:
+ self.config.readfp(conf_data)
+ except configparser.Error:
+ raise MetadataMgrException(-errno.EINVAL, "failed to parse, erroneous metadata config "
+ "'{0}'".format(self.config_path))
+
def flush(self):
# cull empty sections
for section in list(self.config.sections()):
diff --git a/src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py b/src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py
index 2840a9f2e..0d183e612 100644
--- a/src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py
+++ b/src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py
@@ -5,6 +5,7 @@ import errno
import logging
from hashlib import md5
from typing import Dict, Union
+from pathlib import Path
import cephfs
@@ -16,6 +17,7 @@ from ...fs_util import get_ancestor_xattr
from ...exception import MetadataMgrException, VolumeException
from .op_sm import SubvolumeOpSm
from .auth_metadata import AuthMetadataManager
+from .subvolume_attrs import SubvolumeStates
log = logging.getLogger(__name__)
@@ -111,7 +113,7 @@ class SubvolumeBase(object):
@property
def state(self):
""" Subvolume state, one of SubvolumeStates """
- raise NotImplementedError
+ raise SubvolumeStates.from_value(self.metadata_mgr.get_global_option(MetadataManager.GLOBAL_META_KEY_STATE))
@property
def subvol_type(self):
@@ -123,6 +125,15 @@ class SubvolumeBase(object):
raise NotImplementedError
def load_config(self):
+ try:
+ self.fs.stat(self.legacy_config_path)
+ self.legacy_mode = True
+ except cephfs.Error as e:
+ pass
+
+ log.debug("loding config "
+ "'{0}' [mode: {1}]".format(self.subvolname, "legacy"
+ if self.legacy_mode else "new"))
if self.legacy_mode:
self.metadata_mgr = MetadataManager(self.fs, self.legacy_config_path, 0o640)
else:
@@ -271,8 +282,16 @@ class SubvolumeBase(object):
self.fs.stat(self.base_path)
self.metadata_mgr.refresh()
log.debug("loaded subvolume '{0}'".format(self.subvolname))
+ subvolpath = self.metadata_mgr.get_global_option(MetadataManager.GLOBAL_META_KEY_PATH)
+ # subvolume with retained snapshots has enpty path, don't mistake it for
+ # fabricated metadata.
+ if (not self.legacy_mode and self.state != SubvolumeStates.STATE_RETAINED and
+ self.base_path.decode('utf-8') !=(Path(subvolpath).parent)):
+ raise MetadataMgrException(-errno.ENOENT, 'fabricated .meta')
except MetadataMgrException as me:
- if me.errno == -errno.ENOENT and not self.legacy_mode:
+ if me.errno in (-errno.ENOENT, -errno.EINVAL) and not self.legacy_mode:
+ log.warn("subvolume '{0}', {1}, "
+ "assuming legacy_mode".format(self.subvolname, me.error_str))
self.legacy_mode = True
self.load_config()
self.discover()
diff --git a/src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py b/src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py
index d62effd99..39f256638 100644
--- a/src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py
+++ b/src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py
@@ -666,7 +666,7 @@ class SubvolumeV1(SubvolumeBase, SubvolumeTemplate):
@property
def state(self):
- return SubvolumeStates.from_value(self.metadata_mgr.get_global_option(MetadataManager.GLOBAL_META_KEY_STATE))
+ return super(SubvolumeV1, self).state
@state.setter
def state(self, val):
--
2.27.0

View File

@ -1,82 +0,0 @@
From f4035e49ee4745cd384d48a2334be793ce8df461 Mon Sep 17 00:00:00 2001
From: wangzengliang1 <wangzengliang1@huawei.com>
Date: Mon, 5 Dec 2022 15:10:45 +0800
Subject: [PATCH] fix
ceph-crash: drop privleges to run as "ceph" user, rather than root
If privileges cannot be dropped, log an error and exit. This commit
also catches and logs exceptions when scraping the crash path, without
which ceph-crash would just exit if it encountered an error.
Fixes: CVE-2022-3650
Fixes: https://tracker.ceph.com/issues/57967
Signed-off-by: Tim Serong <tserong@suse.com>
---
src/ceph-crash.in | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/ceph-crash.in b/src/ceph-crash.in
index c549dc1..ad5823e 100644
--- a/src/ceph-crash.in
+++ b/src/ceph-crash.in
@@ -3,8 +3,10 @@
# vim: ts=4 sw=4 smarttab expandtab
import argparse
+import grp
import logging
import os
+import pwd
import signal
import socket
import subprocess
@@ -45,7 +47,8 @@ def post_crash(path):
stderr=subprocess.PIPE,
)
f = open(os.path.join(path, 'meta'), 'rb')
- stdout, stderr = pr.communicate(input=f.read())
+ (_, stderr) = pr.communicate(input=f.read())
+ stderr = stderr.decode()
rc = pr.wait()
f.close()
if rc != 0:
@@ -80,7 +83,25 @@ def handler(signum, frame):
print('*** Interrupted with signal %d ***' % signum)
sys.exit(0)
+def drop_privs():
+ if os.getuid() == 0:
+ try:
+ ceph_uid = pwd.getpwnam("ceph").pw_uid
+ ceph_gid = grp.getgrnam("ceph").gr_gid
+ os.setgroups([])
+ os.setgid(ceph_gid)
+ os.setuid(ceph_uid)
+ except Exception as e:
+ log.error(f"Unable to drop privileges: {e}")
+ sys.exit(1)
+
+
def main():
+
+
+ # run as unprivileged ceph user
+ drop_privs()
+
# exit code 0 on SIGINT, SIGTERM
signal.signal(signal.SIGINT, handler)
signal.signal(signal.SIGTERM, handler)
@@ -96,7 +117,10 @@ def main():
log.info("monitoring path %s, delay %ds" % (args.path, args.delay * 60.0))
while True:
- scrape_path(args.path)
+ try:
+ scrape_path(args.path)
+ except Exception as e:
+ log.error(f"Error scraping {args.path}: {e}")
if args.delay == 0:
sys.exit(0)
time.sleep(args.delay * 60)
--
2.13.0.windows.1

View File

@ -1,38 +0,0 @@
From a4c108a75e1240403813c96c022161a7ca33bbae Mon Sep 17 00:00:00 2001
From: liyuanyuan <liyuanyuan@xfusion.com>
Date: Thu, 15 Dec 2022 21:41:04 +0800
Subject: [PATCH] fix no module named v1_event for mgr/k8sevent
---
src/pybind/mgr/k8sevents/module.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/pybind/mgr/k8sevents/module.py b/src/pybind/mgr/k8sevents/module.py
index 1e12d1f27..66235e8f8 100644
--- a/src/pybind/mgr/k8sevents/module.py
+++ b/src/pybind/mgr/k8sevents/module.py
@@ -53,6 +53,9 @@ finally:
event_queue = queue.Queue()
try:
+ import kubernetes
+ from distutils.version import StrictVersion
+
from kubernetes import client, config, watch
from kubernetes.client.rest import ApiException
except ImportError:
@@ -67,7 +70,10 @@ else:
# which causes an exception in the generator. A workaround is discussed for a similar issue
# in https://github.com/kubernetes-client/python/issues/376 which has been used here
# pylint: disable=no-member
- from kubernetes.client.models.v1_event import V1Event
+ if kubernetes.__version__ <= StrictVersion("18.20.0"):
+ from kubernetes.client.models.v1_event import V1Event
+ else:
+ from kubernetes.client.models.core_v1_event import CoreV1Event as V1Event
def local_involved_object(self, involved_object):
if involved_object is None:
involved_object = client.V1ObjectReference(api_version="1")
--
2.27.0

View File

@ -1,29 +0,0 @@
From 46d99c8020dae9372328399618246cd9bc7b4e2b Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Thu, 12 Jan 2023 09:03:33 +0800
Subject: [PATCH] rgw_string.h: has missing includes when compiling with
boost 1.78
ceph compilation failure: invalid use of incomplete type in rgw
https://tracker.ceph.com/issues/50952
https://tracker.ceph.com/issues/50924
---
src/rgw/rgw_string.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h
index 257daa9c1..90e64f98a 100644
--- a/src/rgw/rgw_string.h
+++ b/src/rgw/rgw_string.h
@@ -8,6 +8,8 @@
#include <stdlib.h>
#include <limits.h>
#include <string_view>
+#include <string>
+#include <stdexcept>
#include <boost/container/small_vector.hpp>
--
2.33.0

View File

@ -1,25 +0,0 @@
From 4f6828fc2b7d29557e80ebce6a31a7aa0a1b3e17 Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Thu, 12 Jan 2023 16:17:54 +0800
Subject: [PATCH] add atomic library for loongarch64
---
cmake/modules/CheckCxxAtomic.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/modules/CheckCxxAtomic.cmake b/cmake/modules/CheckCxxAtomic.cmake
index 0b06d5ee4..a2a2a3bfa 100644
--- a/cmake/modules/CheckCxxAtomic.cmake
+++ b/cmake/modules/CheckCxxAtomic.cmake
@@ -11,7 +11,7 @@ function(check_cxx_atomics var)
#include <atomic>
#include <cstdint>
-#if defined(__s390x__) || defined(__sw_64__)
+#if defined(__s390x__) || defined(__sw_64__) || defined(__loongarch64)
// Boost needs 16-byte atomics for tagged pointers.
// These are implemented via inline instructions on the platform
// if 16-byte alignment can be proven, and are delegated to libatomic
--
2.33.0

View File

@ -1,54 +0,0 @@
From ed7c2d0a58fb87201777fb4097d5a2b650593b31 Mon Sep 17 00:00:00 2001
From: Adam C. Emerson <aemerson@redhat.com>
Misplaced colons can result in radosgw thinking is has a bucket URL
but with no bucket name, leading to a crash later on.
Change-Id: 9746e8011ff1de6de7dba9c0041e28a16c8f6828
Change-Id: 95c6c2d209a877b934e05e727a181de8c68accd3
Fixes: https://tracker.ceph.com/issues/55765
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 3ee9a3b)
Fixes: https://tracker.ceph.com/issues/56586
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
---
src/rgw/rgw_common.cc | 5 +++++
src/rgw/rgw_sal.h | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc
index b44d4bf..ce7b94c 100644
--- a/src/rgw/rgw_common.cc
+++ b/src/rgw/rgw_common.cc
@@ -1279,6 +1279,11 @@ bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct re
bool verify_bucket_permission(const DoutPrefixProvider* dpp, struct req_state * const s, const uint64_t op)
{
+ if (rgw::sal::RGWBucket::empty(s->bucket)) {
+ // request is missing a bucket name
+ return false;
+ }
+
perm_state_from_req_state ps(s);
return verify_bucket_permission(dpp,
diff --git a/src/rgw/rgw_sal.h b/src/rgw/rgw_sal.h
index 41da8bc..197f975 100644
--- a/src/rgw/rgw_sal.h
+++ b/src/rgw/rgw_sal.h
@@ -279,8 +279,12 @@ class RGWBucket {
void convert(cls_user_bucket_entry *b) const {
ent.convert(b);
}
+
+ /** Check if a Bucket pointer is empty */
+ static bool empty(const RGWBucket* b) { return (!b || b->empty()); }
+ /** Check if a Bucket unique pointer is empty */
+ static bool empty(const std::unique_ptr<RGWBucket>& b) { return (!b || b->empty()); }
- static bool empty(RGWBucket* b) { return (!b || b->empty()); }
virtual std::unique_ptr<RGWBucket> clone() = 0;
/* dang - This is temporary, until the API is completed */
--
2.13.0.windows.1

View File

@ -1,28 +0,0 @@
From 835de4cfbf8b656c03852a198d5546b11575bceb Mon Sep 17 00:00:00 2001
From: yangxiaoliang <yangxiaoliang07@163.com>
Date: Wed, 7 Sep 2022 07:47:00 +0000
Subject: [PATCH] ceph-volume: add judgment for ceph-volume lvm activate If
only osd_fsid is given, needed `ceph-volume lvm activate "" {osd_fsid}` now
we just need ceph-volume lvm activate {osd_fsid} Signed-off-by: Xiaoliang
Yang <yangxiaoliang07@163.com>
---
src/ceph-volume/ceph_volume/devices/lvm/activate.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py
index 70fceeab645..3539e297d57 100644
--- a/src/ceph-volume/ceph_volume/devices/lvm/activate.py
+++ b/src/ceph-volume/ceph_volume/devices/lvm/activate.py
@@ -364,6 +364,8 @@ class Activate(object):
if len(self.argv) == 0:
print(sub_command_help)
return
+ if not self.argv[0].isdigit() and self.argv[0]:
+ self.argv.insert(0, "")
args = parser.parse_args(self.argv)
# Default to bluestore here since defaulting it in add_argument may
# cause both to be True
--
2.33.0

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +0,0 @@
From f6b6eca9238265bf48e573a57e50da3113a6df49 Mon Sep 17 00:00:00 2001
From: Tom_zc <tom_toworld@163.com>
Date: Tue, 23 May 2023 17:17:58 +0800
Subject: [PATCH] mgr-dashboard-support-multi-language
category: feature
--------------------------------
Fix bug about using the zh-CN language
Signed-off-by: Tom_zc <tom_toworld@163.com>
---
.../mgr/dashboard/frontend/src/locale/messages.zh-CN.xlf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pybind/mgr/dashboard/frontend/src/locale/messages.zh-CN.xlf b/src/pybind/mgr/dashboard/frontend/src/locale/messages.zh-CN.xlf
index 26c61727b..562d71a9a 100644
--- a/src/pybind/mgr/dashboard/frontend/src/locale/messages.zh-CN.xlf
+++ b/src/pybind/mgr/dashboard/frontend/src/locale/messages.zh-CN.xlf
@@ -26,7 +26,7 @@
<x id="PH" equiv-text="request.name"/>
</source>
<target>已更新配置选项
- <x id="INTERPOLATION" equiv-text="{{name}}"/>
+ <x id="PH" equiv-text="{{name}}"/>
</target>
</trans-unit>
<trans-unit id="cff1428d10d59d14e45edec3c735a27b5482db59" datatype="html">
@@ -6792,4 +6792,4 @@
</trans-unit>
</body>
</file>
-</xliff>
\ No newline at end of file
+</xliff>
--
2.33.0

View File

@ -1,140 +0,0 @@
From a89999fee6f9bf55919b4cc34861922ccf1100e1 Mon Sep 17 00:00:00 2001
From: wangzengliang <wangzengliang2@huawei.com>
Date: Fri, 21 Jul 2023 16:00:41 +0800
Subject: [PATCH] Fix Python 3.10(PEP-620) incompatibility
copyed-by: https://github.com/boostorg/python/pull/328
From: Stefan Seefeld <stefan@seefeld.name>
---
src/boost/boost/python/detail/wrap_python.hpp | 5 +++++
src/boost/boost/python/object/make_instance.hpp | 2 +-
src/boost/libs/python/src/object/class.cpp | 15 +++++----------
src/boost/libs/python/src/object/enum.cpp | 2 +-
src/boost/libs/python/src/object/function.cpp | 2 +-
src/boost/libs/python/src/object/life_support.cpp | 2 +-
6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/boost/boost/python/detail/wrap_python.hpp b/src/boost/boost/python/detail/wrap_python.hpp
index 13679dbb8..c3eba3ac6 100644
--- a/src/boost/boost/python/detail/wrap_python.hpp
+++ b/src/boost/boost/python/detail/wrap_python.hpp
@@ -230,6 +230,11 @@ typedef int pid_t;
#endif
+#if PY_VERSION_HEX < 0x030900A4
+# define Py_SET_TYPE(obj, type) ((Py_TYPE(obj) = (type)), (void)0)
+# define Py_SET_SIZE(obj, size) ((Py_TYPE(obj) = (size)), (void)0)
+#endif
+
#ifdef __MWERKS__
# pragma warn_possunwant off
diff --git a/src/boost/boost/python/object/make_instance.hpp b/src/boost/boost/python/object/make_instance.hpp
index 31ec08f7c..5eb3aa9d9 100644
--- a/src/boost/boost/python/object/make_instance.hpp
+++ b/src/boost/boost/python/object/make_instance.hpp
@@ -47,7 +47,7 @@ struct make_instance_impl
// Note the position of the internally-stored Holder,
// for the sake of destruction
- Py_SIZE(instance) = offsetof(instance_t, storage);
+ Py_SET_SIZE(instance, offsetof(instance_t, storage));
// Release ownership of the python object
protect.cancel();
diff --git a/src/boost/libs/python/src/object/class.cpp b/src/boost/libs/python/src/object/class.cpp
index 9bb9683a3..2d1112298 100644
--- a/src/boost/libs/python/src/object/class.cpp
+++ b/src/boost/libs/python/src/object/class.cpp
@@ -208,7 +208,7 @@ namespace objects
{
if (static_data_object.tp_dict == 0)
{
- Py_TYPE(&static_data_object) = &PyType_Type;
+ Py_SET_TYPE(&static_data_object, &PyType_Type);
static_data_object.tp_base = &PyProperty_Type;
if (PyType_Ready(&static_data_object))
return 0;
@@ -316,7 +316,7 @@ namespace objects
{
if (class_metatype_object.tp_dict == 0)
{
- Py_TYPE(&class_metatype_object) = &PyType_Type;
+ Py_SET_TYPE(&class_metatype_object, &PyType_Type);
class_metatype_object.tp_base = &PyType_Type;
if (PyType_Ready(&class_metatype_object))
return type_handle();
@@ -374,12 +374,7 @@ namespace objects
// like, so we'll store the total size of the object
// there. A negative number indicates that the extra
// instance memory is not yet allocated to any holders.
-#if PY_VERSION_HEX >= 0x02060000
- Py_SIZE(result) =
-#else
- result->ob_size =
-#endif
- -(static_cast<int>(offsetof(instance<>,storage) + instance_size));
+ Py_SET_SIZE(result, -static_cast<int>(offsetof(instance<>,storage) + instance_size));
}
return (PyObject*)result;
}
@@ -470,7 +465,7 @@ namespace objects
{
if (class_type_object.tp_dict == 0)
{
- Py_TYPE(&class_type_object) = incref(class_metatype().get());
+ Py_SET_TYPE(&class_type_object, incref(class_metatype().get()));
class_type_object.tp_base = &PyBaseObject_Type;
if (PyType_Ready(&class_type_object))
return type_handle();
@@ -739,7 +734,7 @@ void* instance_holder::allocate(PyObject* self_, std::size_t holder_offset, std:
assert(holder_offset >= offsetof(objects::instance<>,storage));
// Record the fact that the storage is occupied, noting where it starts
- Py_SIZE(self) = holder_offset;
+ Py_SET_SIZE(self, holder_offset);
return (char*)self + holder_offset;
}
else
diff --git a/src/boost/libs/python/src/object/enum.cpp b/src/boost/libs/python/src/object/enum.cpp
index 10122ad1d..293e70589 100644
--- a/src/boost/libs/python/src/object/enum.cpp
+++ b/src/boost/libs/python/src/object/enum.cpp
@@ -153,7 +153,7 @@ namespace
{
if (enum_type_object.tp_dict == 0)
{
- Py_TYPE(&enum_type_object) = incref(&PyType_Type);
+ Py_SET_TYPE(&enum_type_object, incref(&PyType_Type));
#if PY_VERSION_HEX >= 0x03000000
enum_type_object.tp_base = &PyLong_Type;
#else
diff --git a/src/boost/libs/python/src/object/function.cpp b/src/boost/libs/python/src/object/function.cpp
index 9d4745d10..787679e13 100644
--- a/src/boost/libs/python/src/object/function.cpp
+++ b/src/boost/libs/python/src/object/function.cpp
@@ -107,7 +107,7 @@ function::function(
PyObject* p = this;
if (Py_TYPE(&function_type) == 0)
{
- Py_TYPE(&function_type) = &PyType_Type;
+ Py_SET_TYPE(&function_type, &PyType_Type);
::PyType_Ready(&function_type);
}
diff --git a/src/boost/libs/python/src/object/life_support.cpp b/src/boost/libs/python/src/object/life_support.cpp
index b7e9aa861..281c3bffc 100644
--- a/src/boost/libs/python/src/object/life_support.cpp
+++ b/src/boost/libs/python/src/object/life_support.cpp
@@ -93,7 +93,7 @@ PyObject* make_nurse_and_patient(PyObject* nurse, PyObject* patient)
if (Py_TYPE(&life_support_type) == 0)
{
- Py_TYPE(&life_support_type) = &PyType_Type;
+ Py_SET_TYPE(&life_support_type, &PyType_Type);
PyType_Ready(&life_support_type);
}
--
2.27.0

View File

@ -1,24 +0,0 @@
From c76040b420284071ef9ea093c09c830379b31041 Mon Sep 17 00:00:00 2001
From: wangzengliang <wangzengliang2@huawei.com>
Date: Fri, 21 Jul 2023 17:27:24 +0800
Subject: [PATCH] include memory
---
src/include/buffer.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/include/buffer.h b/src/include/buffer.h
index 7c8f90e9f..71cb01935 100644
--- a/src/include/buffer.h
+++ b/src/include/buffer.h
@@ -41,6 +41,7 @@
#include <iosfwd>
#include <iomanip>
#include <list>
+#include <memory>
#include <vector>
#include <string>
#if __cplusplus >= 201703L
--
2.27.0

View File

@ -1,46 +0,0 @@
From 824b1101570d5a2417ef22e6a7fa358f4a0ffb9d Mon Sep 17 00:00:00 2001
From: wangzengliang <wangzengliang2@huawei.com>
Date: Fri, 21 Jul 2023 17:52:36 +0800
Subject: [PATCH] gcc12 need constexpr
---
src/common/dout.h | 4 ++--
src/libcephsqlite.cc | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/common/dout.h b/src/common/dout.h
index 421222d53..ae52c358b 100644
--- a/src/common/dout.h
+++ b/src/common/dout.h
@@ -99,11 +99,11 @@ namespace ceph::dout {
template<typename T>
struct dynamic_marker_t {
T value;
- operator T() const { return value; }
+ constexpr operator T() const { return value; }
};
template<typename T>
-dynamic_marker_t<T> need_dynamic(T&& t) {
+constexpr dynamic_marker_t<T> need_dynamic(T&& t) {
return dynamic_marker_t<T>{ std::forward<T>(t) };
}
diff --git a/src/libcephsqlite.cc b/src/libcephsqlite.cc
index 3db64a19f..a6e8a4883 100644
--- a/src/libcephsqlite.cc
+++ b/src/libcephsqlite.cc
@@ -380,8 +380,8 @@ static int FileSize(sqlite3_file *file, sqlite_int64 *osize)
static bool parsepath(std::string_view path, struct cephsqlite_fileloc* fileloc)
{
- static const std::regex re1{"^/*(\\*[[:digit:]]+):([[:alnum:]-_.]*)/([[:alnum:]-._]+)$"};
- static const std::regex re2{"^/*([[:alnum:]-_.]+):([[:alnum:]-_.]*)/([[:alnum:]-._]+)$"};
+ static const std::regex re1{"^/*(\\*[[:digit:]]+):([[:alnum:]\\-_.]*)/([[:alnum:]\\-._]+)$"};
+ static const std::regex re2{"^/*([[:alnum:]\\-_.]+):([[:alnum:]\\-_.]*)/([[:alnum:]\\-._]+)$"};
std::cmatch cm;
if (!std::regex_match(path.data(), cm, re1)) {
--
2.27.0

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
--- a/cmake/modules/CheckCxxAtomic.cmake 2023-08-23 14:08:23.304911386 +0800
+++ b/cmake/modules/CheckCxxAtomic.cmake 2023-08-23 14:09:10.994614880 +0800
@@ -11,7 +11,7 @@
#include <atomic>
#include <cstdint>
-#if defined(__s390x__) || defined(__sw_64__) || defined(__loongarch64)
+#if defined(__s390x__) || defined(__sw_64__) || defined(__loongarch64) || defined(__riscv)
// Boost needs 16-byte atomics for tagged pointers.
// These are implemented via inline instructions on the platform
// if 16-byte alignment can be proven, and are delegated to libatomic

View File

@ -1,41 +0,0 @@
From ed97f95b6608fb11703b18d38b6690ee8b3dbcd6 Mon Sep 17 00:00:00 2001
From: wangzengliang <wangzengliang2@huawei.com>
Date: Mon, 9 Oct 2023 10:50:45 +0800
Subject: [PATCH] fix CVE-2023-43040
Fixes: https://tracker.ceph.com/issues/63004
copied-by: https://github.com/ceph/ceph/pull/53758
signed-off-by: Joshua Baergen <jbaergen@gigitalocean.com>
---
src/rgw/rgw_rest_s3.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc
index 2247c20dd..d06feddd0 100644
--- a/src/rgw/rgw_rest_s3.cc
+++ b/src/rgw/rgw_rest_s3.cc
@@ -2660,10 +2660,6 @@ int RGWPostObj_ObjStore_S3::get_params(optional_yield y)
map_qs_metadata(s);
- ldpp_dout(this, 20) << "adding bucket to policy env: " << s->bucket->get_name()
- << dendl;
- env.add_var("bucket", s->bucket->get_name());
-
bool done;
do {
struct post_form_part part;
@@ -2714,6 +2710,10 @@ int RGWPostObj_ObjStore_S3::get_params(optional_yield y)
env.add_var(part.name, part_str);
} while (!done);
+ ldpp_dout(this, 20) << "adding bucket to policy env: " << s->bucket->get_name()
+ << dendl;
+ env.add_var("bucket", s->bucket->get_name());
+
string object_str;
if (!part_str(parts, "key", &object_str)) {
err_msg = "Key not specified";
--
2.27.0

Binary file not shown.

View File

@ -174,7 +174,7 @@
#################################################################################
Name: ceph
Version: 18.2.1
Release: 1
Release: 2
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
Epoch: 2
%endif
@ -2630,7 +2630,10 @@ exit 0
%{_datadir}/snmp/mibs
%changelog
* Thu Jan 11 2024 wangzengliang <wangzengliang2@huawei.com> - 2:18.2.1-1
* Tue Jan 30 2024 wangzengliang <wangzengliang2@huawei.com> - 2:18.2.1-2
- delete some files related to ceph-16.2.7
* Sat Jan 27 2024 wangzengliang <wangzengliang2@huawei.com> - 2:18.2.1-1
- init ceph 18.2.1 on openEuler
- modify xsimd source to local and set cxx17 for arrow