From ca67ba9f4a0fc4e0861343693f6832cb4d604709 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Thu, 27 Jun 2024 14:28:49 +0200 Subject: [PATCH] tests: Try waiting after partition creation for XFS resize test Resolves: RHEL-8009 --- 0026-XFS-resize-test-fix.patch | 61 ++++++++++++++++++++++++++++++++++ python-blivet.spec | 7 +++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 0026-XFS-resize-test-fix.patch diff --git a/0026-XFS-resize-test-fix.patch b/0026-XFS-resize-test-fix.patch new file mode 100644 index 0000000..9b82d36 --- /dev/null +++ b/0026-XFS-resize-test-fix.patch @@ -0,0 +1,61 @@ +From 5bd9eee844859f5cd5d9f4f1c8915dab931de12b Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 18 Jun 2024 14:47:39 +0200 +Subject: [PATCH 1/2] tests: Try waiting after partition creation for XFS + resize test + +The test randomly fails to find the newly created partition so +lets try waiting a bit with udev settle. +--- + tests/storage_tests/formats_test/fs_test.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/storage_tests/formats_test/fs_test.py b/tests/storage_tests/formats_test/fs_test.py +index 1d42dc21..59c0f998 100644 +--- a/tests/storage_tests/formats_test/fs_test.py ++++ b/tests/storage_tests/formats_test/fs_test.py +@@ -10,6 +10,7 @@ from blivet.errors import DeviceFormatError, FSError + from blivet.formats import get_format + from blivet.devices import PartitionDevice, DiskDevice + from blivet.flags import flags ++from blivet import udev + + from .loopbackedtestcase import LoopBackedTestCase + +@@ -107,6 +108,7 @@ class XFSTestCase(fstesting.FSAsRoot): + pend = pstart + int(Size(size) / disk.format.parted_device.sectorSize) + disk.format.add_partition(pstart, pend, parted.PARTITION_NORMAL) + disk.format.parted_disk.commit() ++ udev.settle() + part = disk.format.parted_disk.getPartitionBySector(pstart) + + device = PartitionDevice(os.path.basename(part.path)) +-- +2.45.2 + + +From 230cbb1d194333a00554b8afe09768f15972cf2f Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 7 Mar 2024 09:45:28 +0100 +Subject: [PATCH 2/2] Fix util.detect_virt on Amazon + +--- + blivet/util.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blivet/util.py b/blivet/util.py +index 3040ee5a..15d41b4f 100644 +--- a/blivet/util.py ++++ b/blivet/util.py +@@ -1137,7 +1137,7 @@ def detect_virt(): + except (safe_dbus.DBusCallError, safe_dbus.DBusPropertyError): + return False + else: +- return vm[0] in ('qemu', 'kvm', 'xen') ++ return vm[0] in ('qemu', 'kvm', 'xen', 'microsoft', 'amazon') + + + def natural_sort_key(device): +-- +2.45.2 + diff --git a/python-blivet.spec b/python-blivet.spec index 4d67a5a..d7fd182 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -23,7 +23,7 @@ Version: 3.6.0 #%%global prerelease .b2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 -Release: 15%{?prerelease}%{?dist} +Release: 16%{?prerelease}%{?dist} Epoch: 1 License: LGPLv2+ %global realname blivet @@ -55,6 +55,7 @@ Patch21: 0022-add-udev-builtin-path_id-property-to-zfcp-attached-S.patch Patch22: 0023-Do-not-add-new-PVs-to-the-LVM-devices-file-if-it-doe.patch Patch23: 0024-Added-support-for-PV-grow.patch Patch24: 0025-Stratis-fixes-backport.patch +Patch25: 0026-XFS-resize-test-fix.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -218,6 +219,10 @@ configuration. %endif %changelog +* Thu Jun 27 2024 Vojtech Trefny - 3.6.0-16 +- tests: Try waiting after partition creation for XFS resize test + Resolves: RHEL-8009 + * Thu May 16 2024 Vojtech Trefny - 3.6.0-15 - Backport fixes for Stratis support needed for storage role Resolves: RHEL-35382