Fix potential AttributeError when getting stratis blockdev info
Related: rhbz#2123711 tests: Skip XFS resize test on CentOS/RHEL 9 Related: rhbz#2123711
This commit is contained in:
parent
ba16cbcfba
commit
4a6944ce14
@ -0,0 +1,45 @@
|
||||
From 7931a74e691979dd23a16e7a017b4ef5bc296b79 Mon Sep 17 00:00:00 2001
|
||||
From: Vojtech Trefny <vtrefny@redhat.com>
|
||||
Date: Tue, 18 Oct 2022 12:28:37 +0200
|
||||
Subject: [PATCH] Fix potential AttributeError when getting stratis blockdev
|
||||
info
|
||||
|
||||
---
|
||||
blivet/static_data/stratis_info.py | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/blivet/static_data/stratis_info.py b/blivet/static_data/stratis_info.py
|
||||
index bd1c5a18..42f230ee 100644
|
||||
--- a/blivet/static_data/stratis_info.py
|
||||
+++ b/blivet/static_data/stratis_info.py
|
||||
@@ -124,20 +124,22 @@ class StratisInfo(object):
|
||||
log.error("Failed to get DBus properties of '%s'", blockdev_path)
|
||||
return None
|
||||
|
||||
+ blockdev_uuid = str(uuid.UUID(properties["Uuid"]))
|
||||
+
|
||||
pool_path = properties["Pool"]
|
||||
if pool_path == "/":
|
||||
pool_name = ""
|
||||
+ return StratisBlockdevInfo(path=properties["Devnode"], uuid=blockdev_uuid,
|
||||
+ pool_name="", pool_uuid="", object_path=blockdev_path)
|
||||
else:
|
||||
pool_info = self._get_pool_info(properties["Pool"])
|
||||
if not pool_info:
|
||||
return None
|
||||
pool_name = pool_info.name
|
||||
|
||||
- blockdev_uuid = str(uuid.UUID(properties["Uuid"]))
|
||||
-
|
||||
- return StratisBlockdevInfo(path=properties["Devnode"], uuid=blockdev_uuid,
|
||||
- pool_name=pool_name, pool_uuid=pool_info.uuid,
|
||||
- object_path=blockdev_path)
|
||||
+ return StratisBlockdevInfo(path=properties["Devnode"], uuid=blockdev_uuid,
|
||||
+ pool_name=pool_name, pool_uuid=pool_info.uuid,
|
||||
+ object_path=blockdev_path)
|
||||
|
||||
def _get_locked_pools_info(self):
|
||||
locked_pools = []
|
||||
--
|
||||
2.37.3
|
||||
|
27
0007-tests-Skip-XFS-resize-test-on-CentOS-RHEL-9.patch
Normal file
27
0007-tests-Skip-XFS-resize-test-on-CentOS-RHEL-9.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From b747c4ed07937f54a546ffb2f2c8c95e0797dd6c Mon Sep 17 00:00:00 2001
|
||||
From: Vojtech Trefny <vtrefny@redhat.com>
|
||||
Date: Thu, 20 Oct 2022 15:19:29 +0200
|
||||
Subject: [PATCH] tests: Skip XFS resize test on CentOS/RHEL 9
|
||||
|
||||
Partitions on loop devices are broken on CentOS/RHEL 9.
|
||||
---
|
||||
tests/skip.yml | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/tests/skip.yml b/tests/skip.yml
|
||||
index 568c3fff..66b34493 100644
|
||||
--- a/tests/skip.yml
|
||||
+++ b/tests/skip.yml
|
||||
@@ -29,3 +29,9 @@
|
||||
- distro: "centos"
|
||||
version: "9"
|
||||
reason: "Creating RAID 1 LV on CentOS/RHEL 9 causes a system deadlock"
|
||||
+
|
||||
+- test: storage_tests.formats_test.fs_test.XFSTestCase.test_resize
|
||||
+ skip_on:
|
||||
+ - distro: ["centos", "enterprise_linux"]
|
||||
+ version: "9"
|
||||
+ reason: "Creating partitions on loop devices is broken on CentOS/RHEL 9 latest kernel"
|
||||
--
|
||||
2.37.3
|
||||
|
@ -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: 1%{?prerelease}%{?dist}
|
||||
Release: 2%{?prerelease}%{?dist}
|
||||
Epoch: 1
|
||||
License: LGPLv2+
|
||||
%global realname blivet
|
||||
@ -35,6 +35,8 @@ Patch1: 0002-remove-btrfs-plugin.patch
|
||||
Patch2: 0003-Revert-More-consistent-lvm-errors.patch
|
||||
Patch3: 0004-DDF-RAID-support-using-mdadm.patch
|
||||
Patch4: 0005-Revert-Remove-the-Blivet.roots-attribute.patch
|
||||
Patch5: 0006-Fix-potential-AttributeError-when-getting-stratis-bl.patch
|
||||
Patch6: 0007-tests-Skip-XFS-resize-test-on-CentOS-RHEL-9.patch
|
||||
|
||||
# Versions of required components (done so we make sure the buildrequires
|
||||
# match the requires versions of things).
|
||||
@ -197,6 +199,12 @@ configuration.
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Oct 20 2022 Vojtech Trefny <vtrefny@redhat.com> - 3.6.0-2
|
||||
- Fix potential AttributeError when getting stratis blockdev info
|
||||
Related: rhbz#2123711
|
||||
- tests: Skip XFS resize test on CentOS/RHEL 9
|
||||
Related: rhbz#2123711
|
||||
|
||||
* Thu Oct 13 2022 Vojtech Trefny <vtrefny@redhat.com> - 3.6.0-1
|
||||
- Rebase to the latest upstream release 3.6.0
|
||||
Resolves: rhbz#2123711
|
||||
|
Loading…
Reference in New Issue
Block a user