From ab8cffd94867fdd945cb1810149dad7e5d74a513 Mon Sep 17 00:00:00 2001 From: Xiaoliang Yang Date: Wed, 7 Sep 2022 15:58:20 +0800 Subject: [PATCH 1/2] ceph-volume: add judgment for ceph-volume lvm activate Signed-off-by: Xiaoliang Yang --- ...judgment-for-ceph-volume-lvm-activat.patch | 28 +++++++++++++++++++ ceph.spec | 6 +++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch diff --git a/0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch b/0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch new file mode 100644 index 0000000..02bc96e --- /dev/null +++ b/0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch @@ -0,0 +1,28 @@ +From 835de4cfbf8b656c03852a198d5546b11575bceb Mon Sep 17 00:00:00 2001 +From: yangxiaoliang +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 + +--- + 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 + diff --git a/ceph.spec b/ceph.spec index 2969bc4..1c426e3 100644 --- a/ceph.spec +++ b/ceph.spec @@ -125,7 +125,7 @@ ################################################################################# Name: ceph Version: 16.2.7 -Release: 5 +Release: 6 %if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} Epoch: 2 %endif @@ -149,6 +149,7 @@ Patch3: 0003-isa-l-update.patch Patch4: 0004-cmake-add-support-python-3.10.patch Patch5: 0005-ceph-volume-lvm-api-function-no-undefined.patch Patch6: 0006-ceph-volume-decrease-number-of-pvs-calls-in-lvm-list.patch +Patch7: 0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch %if 0%{?suse_version} # _insert_obs_source_lines_here ExclusiveArch: x86_64 aarch64 ppc64le s390x @@ -2487,6 +2488,9 @@ exit 0 %config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml %changelog +* Wed Sep 7 2022 yangxiaoliang - 2:16.2.7-6 +- add judgment for ceph-volume lvm activate + * Thu Aug 25 2022 yangxiaoliang - 2:16.2.7-5 - fix ceph-volume lvm list calls many times pvs -- Gitee From e2c1d9d31c58ccada2eaafee67489256c26866e5 Mon Sep 17 00:00:00 2001 From: Xiaoliang Yang Date: Tue, 1 Nov 2022 10:36:17 +0800 Subject: [PATCH 2/2] ceph-volume: add judgment for ceph-volume lvm activate Signed-off-by: Xiaoliang Yang --- 0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch b/0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch index 02bc96e..fa5654a 100644 --- a/0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch +++ b/0007-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch @@ -19,7 +19,7 @@ index 70fceeab645..3539e297d57 100644 print(sub_command_help) return + if not self.argv[0].isdigit() and self.argv[0]: -+ self.argv.insert(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 -- Gitee