diff --git a/libvirt-virStorageBackendLogicalCheckPool-Properly-mark-empty-logical-pools-as-active.patch b/libvirt-virStorageBackendLogicalCheckPool-Properly-mark-empty-logical-pools-as-active.patch new file mode 100644 index 0000000000000000000000000000000000000000..dbfcfe272c93cd736e0e2b04327223d24823a38a --- /dev/null +++ b/libvirt-virStorageBackendLogicalCheckPool-Properly-mark-empty-logical-pools-as-active.patch @@ -0,0 +1,51 @@ +From afbf59c823a04b417b4ae66edb99e15e6e8ba877 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Peter Krempa +Date: Tue, 8 Aug 2023 15:53:53 +0200 +Subject: [PATCH] virStorageBackendLogicalCheckPool: Properly mark empty + logical pools as active +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The '/dev' filesystem convenience directory for a LVM volume group is +not created when the volume group is empty. + +The logic in 'virStorageBackendLogicalCheckPool' which is used to see +whether a pool is active was first checking presence of the directory, +which failed for an empty VG. + +Since the second step is virStorageBackendLogicalMatchPoolSource which +is checking mapping between configured PVs and the VG, we can simply +rely on the function to also check presence of the pool. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2228223 +Signed-off-by: Peter Krempa +Reviewed-by: Ján Tomko +(cherry picked from commit fa1a54baa59d244289ce666f9dc52d9eabca47f1) +https://issues.redhat.com/browse/RHEL-65771 +--- + src/storage/storage_backend_logical.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c +index 3f27e63aeb..b7e3ba2498 100644 +--- a/src/storage/storage_backend_logical.c ++++ b/src/storage/storage_backend_logical.c +@@ -628,13 +628,7 @@ static int + virStorageBackendLogicalCheckPool(virStoragePoolObj *pool, + bool *isActive) + { +- virStoragePoolDef *def = virStoragePoolObjGetDef(pool); +- +- /* If we can find the target.path as well as ensure that the +- * pool's def source +- */ +- *isActive = virFileExists(def->target.path) && +- virStorageBackendLogicalMatchPoolSource(pool); ++ *isActive = virStorageBackendLogicalMatchPoolSource(pool); + return 0; + } + +-- +2.47.0 diff --git a/libvirt.spec b/libvirt.spec index a3f41763c151f37f2bdd818d7db7491468d0f62b..0cbd0ae613b1f752997c8a84911a6b2df51d6e5f 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -3,7 +3,7 @@ # This spec file assumes you are building on a Fedora or RHEL version # that's still supported by the vendor. It may work on other distros # or versions, but no effort will be made to ensure that going forward. -%define anolis_release .0.3 +%define anolis_release .0.1 %define min_rhel 8 %define min_fedora 33 @@ -211,7 +211,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 8.0.0 -Release: 23.2%{anolis_release}%{?dist}%{?extra_release} +Release: 23.3%{anolis_release}%{?dist}%{?extra_release} License: LGPLv2+ URL: https://libvirt.org/ @@ -322,6 +322,7 @@ Patch98: libvirt-virnuma-Avoid-integer-overflow-in-virNumaGetPages.patch Patch99: libvirt-remote-check-for-negative-array-lengths-before-allocation.patch Patch100: libvirt-util-Fix-error-return-for-virProcessKillPainfullyDelay.patch Patch101: libvirt-rpc-ensure-temporary-GSource-is-removed-from-client-event-loop.patch +Patch102: libvirt-virStorageBackendLogicalCheckPool-Properly-mark-empty-logical-pools-as-active.patch Patch1000: libvirt-Add-loongarch-support.patch Patch1001: libvirt-add-loongarch-edit-xml-validate.patch Patch1004: qemu-validate-Drop-tpm-tis-arch-validation.patch @@ -2208,18 +2209,17 @@ exit 0 %changelog -* Mon Sep 30 2024 lufeifei - 8.0.0-23.2.0.3 -- Add sw64arch support - -* Fri Sep 20 2024 Jiakun Shuai - 8.0.0-23.2.0.2 -- Add Phytium S5000C CPU model - -* Mon Jul 15 2024 zhaotianrui - 8.0.0-23.2.0.1 +* Fri Dec 20 2024 zhaotianrui - 8.0.0-23.3.0.1 - Add loongarch support - Fix loongarch xml validate - Synchronize upstream patches "Use correct tpm device for all non-x86" (lixianglai@loongson.cn) - Synchronize upstream patches "validate: Drop tpm-tis arch validation" (lixianglai@loongson.cn) - Add new Dharma CPU model (zhouyanjing@hygon.cn) +- Add Phytium S5000C CPU model (shuaijiakun1288@phytium.com.cn) +- Add sw64arch support (lufeifei@wxiat.com) + +* Wed Nov 6 2024 Jiri Denemark - 8.0.0-23.3.el8 +- virStorageBackendLogicalCheckPool: Properly mark empty logical pools as active (RHEL-65771) * Thu Jun 6 2024 Jiri Denemark - 8.0.0-23.2.el8 - util: Fix error return for virProcessKillPainfullyDelay() (RHEL-36064)