Rebase to the latest upstream release 3.10.0
Resolves: RHEL-35572
This commit is contained in:
parent
0a538e637b
commit
0d35f1887b
2
.gitignore
vendored
2
.gitignore
vendored
@ -161,3 +161,5 @@
|
|||||||
/blivet-3.8.2-tests.tar.gz
|
/blivet-3.8.2-tests.tar.gz
|
||||||
/blivet-3.9.0-tests.tar.gz
|
/blivet-3.9.0-tests.tar.gz
|
||||||
/blivet-3.9.0.tar.gz
|
/blivet-3.9.0.tar.gz
|
||||||
|
/blivet-3.10.0.tar.gz
|
||||||
|
/blivet-3.10.0-tests.tar.gz
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
From d5169a83f2428dbe2406881e8928a4418c04a365 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
||||||
Date: Fri, 2 Feb 2024 12:05:15 +0100
|
|
||||||
Subject: [PATCH] Fix crash when scanning degraded/not fully assembled MD
|
|
||||||
arrays
|
|
||||||
|
|
||||||
When we don't have the array name we cannot construct device ID
|
|
||||||
for the devicetree lookup, we need to let the code fallback to
|
|
||||||
other means like UUID.
|
|
||||||
---
|
|
||||||
blivet/populator/helpers/mdraid.py | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/blivet/populator/helpers/mdraid.py b/blivet/populator/helpers/mdraid.py
|
|
||||||
index 6d66b0c0..22ca5195 100644
|
|
||||||
--- a/blivet/populator/helpers/mdraid.py
|
|
||||||
+++ b/blivet/populator/helpers/mdraid.py
|
|
||||||
@@ -58,7 +58,8 @@ class MDDevicePopulator(DevicePopulator):
|
|
||||||
return None
|
|
||||||
|
|
||||||
# try to get the device again now that we've got all the parents
|
|
||||||
- device = self._devicetree.get_device_by_device_id("MDRAID-" + name, incomplete=flags.allow_imperfect_devices)
|
|
||||||
+ if name:
|
|
||||||
+ device = self._devicetree.get_device_by_device_id("MDRAID-" + name, incomplete=flags.allow_imperfect_devices)
|
|
||||||
|
|
||||||
if device is None:
|
|
||||||
try:
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
|||||||
From e65ff27b7e7907258faf25bd94880c310ce6744a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steffen Maier <maier@linux.ibm.com>
|
|
||||||
Date: Thu, 23 Feb 2023 13:28:50 +0100
|
|
||||||
Subject: [PATCH] add udev-builtin-path_id property to zfcp-attached SCSI disks
|
|
||||||
|
|
||||||
so anaconda can use it to display path_id information for multipath
|
|
||||||
members
|
|
||||||
|
|
||||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
|
||||||
---
|
|
||||||
blivet/devices/disk.py | 2 ++
|
|
||||||
blivet/populator/helpers/disk.py | 1 +
|
|
||||||
tests/unit_tests/tags_test.py | 2 +-
|
|
||||||
3 files changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/blivet/devices/disk.py b/blivet/devices/disk.py
|
|
||||||
index 5053f7bb..1db4b940 100644
|
|
||||||
--- a/blivet/devices/disk.py
|
|
||||||
+++ b/blivet/devices/disk.py
|
|
||||||
@@ -469,10 +469,12 @@ class ZFCPDiskDevice(DiskDevice):
|
|
||||||
:keyword hba_id: ???
|
|
||||||
:keyword wwpn: ???
|
|
||||||
:keyword fcp_lun: ???
|
|
||||||
+ :keyword id_path: string from udev-builtin-path_id
|
|
||||||
"""
|
|
||||||
self.hba_id = kwargs.pop("hba_id")
|
|
||||||
self.wwpn = kwargs.pop("wwpn")
|
|
||||||
self.fcp_lun = kwargs.pop("fcp_lun")
|
|
||||||
+ self.id_path = kwargs.pop("id_path")
|
|
||||||
DiskDevice.__init__(self, device, **kwargs)
|
|
||||||
self._clear_local_tags()
|
|
||||||
self.tags.add(Tags.remote)
|
|
||||||
diff --git a/blivet/populator/helpers/disk.py b/blivet/populator/helpers/disk.py
|
|
||||||
index ce2cb73b..2d66f797 100644
|
|
||||||
--- a/blivet/populator/helpers/disk.py
|
|
||||||
+++ b/blivet/populator/helpers/disk.py
|
|
||||||
@@ -223,6 +223,7 @@ class ZFCPDevicePopulator(DiskDevicePopulator):
|
|
||||||
def _get_kwargs(self):
|
|
||||||
kwargs = super(ZFCPDevicePopulator, self)._get_kwargs()
|
|
||||||
|
|
||||||
+ kwargs["id_path"] = udev.device_get_path(self.data)
|
|
||||||
for attr in ['hba_id', 'wwpn', 'fcp_lun']:
|
|
||||||
kwargs[attr] = udev.device_get_zfcp_attribute(self.data, attr=attr)
|
|
||||||
|
|
||||||
diff --git a/tests/unit_tests/tags_test.py b/tests/unit_tests/tags_test.py
|
|
||||||
index 49a2d72e..15fa2a40 100644
|
|
||||||
--- a/tests/unit_tests/tags_test.py
|
|
||||||
+++ b/tests/unit_tests/tags_test.py
|
|
||||||
@@ -72,7 +72,7 @@ class DeviceTagsTest(unittest.TestCase):
|
|
||||||
fcoe_device = FcoeDiskDevice('test6', nic=None, identifier=None, id_path=None)
|
|
||||||
self.assertIn(Tags.remote, fcoe_device.tags)
|
|
||||||
self.assertNotIn(Tags.local, fcoe_device.tags)
|
|
||||||
- zfcp_device = ZFCPDiskDevice('test7', hba_id=None, wwpn=None, fcp_lun=None)
|
|
||||||
+ zfcp_device = ZFCPDiskDevice('test7', hba_id=None, wwpn=None, fcp_lun=None, id_path=None)
|
|
||||||
self.assertIn(Tags.remote, zfcp_device.tags)
|
|
||||||
self.assertNotIn(Tags.local, zfcp_device.tags)
|
|
||||||
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From c141179b18984c5a96cd605c29df9716c714afe8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
||||||
Date: Mon, 12 Feb 2024 14:49:23 +0100
|
|
||||||
Subject: [PATCH] Fix UnboundLocalError in MD populator
|
|
||||||
|
|
||||||
Follow-up for a73bb08255a97cf4f16c764ef09341a2421318d6
|
|
||||||
---
|
|
||||||
blivet/populator/helpers/mdraid.py | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/blivet/populator/helpers/mdraid.py b/blivet/populator/helpers/mdraid.py
|
|
||||||
index 22ca5195..c552aace 100644
|
|
||||||
--- a/blivet/populator/helpers/mdraid.py
|
|
||||||
+++ b/blivet/populator/helpers/mdraid.py
|
|
||||||
@@ -60,6 +60,8 @@ class MDDevicePopulator(DevicePopulator):
|
|
||||||
# try to get the device again now that we've got all the parents
|
|
||||||
if name:
|
|
||||||
device = self._devicetree.get_device_by_device_id("MDRAID-" + name, incomplete=flags.allow_imperfect_devices)
|
|
||||||
+ else:
|
|
||||||
+ device = None
|
|
||||||
|
|
||||||
if device is None:
|
|
||||||
try:
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-10
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
@ -1,11 +1,11 @@
|
|||||||
Summary: A python module for system storage configuration
|
Summary: A python module for system storage configuration
|
||||||
Name: python-blivet
|
Name: python-blivet
|
||||||
Url: https://storageapis.wordpress.com/projects/blivet
|
Url: https://storageapis.wordpress.com/projects/blivet
|
||||||
Version: 3.9.0
|
Version: 3.10.0
|
||||||
|
|
||||||
#%%global prerelease .b2
|
#%%global prerelease .b2
|
||||||
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
|
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
|
||||||
Release: 3%{?prerelease}%{?dist}
|
Release: 1%{?prerelease}%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: LGPL-2.1-or-later
|
License: LGPL-2.1-or-later
|
||||||
%global realname blivet
|
%global realname blivet
|
||||||
@ -17,9 +17,6 @@ Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realver
|
|||||||
Patch0: 0001-remove-btrfs-plugin.patch
|
Patch0: 0001-remove-btrfs-plugin.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Patch1: 0002-Fix-crash-when-scanning-degraded-not-fully-assembled.patch
|
|
||||||
Patch2: 0003-Fix-UnboundLocalError-in-MD-populator.patch
|
|
||||||
|
|
||||||
# Versions of required components (done so we make sure the buildrequires
|
# Versions of required components (done so we make sure the buildrequires
|
||||||
# match the requires versions of things).
|
# match the requires versions of things).
|
||||||
%global partedver 1.8.1
|
%global partedver 1.8.1
|
||||||
@ -58,7 +55,6 @@ BuildRequires: python3-devel
|
|||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
Requires: python3
|
Requires: python3
|
||||||
Requires: python3-six
|
|
||||||
Requires: python3-pyudev >= %{pyudevver}
|
Requires: python3-pyudev >= %{pyudevver}
|
||||||
Requires: parted >= %{partedver}
|
Requires: parted >= %{partedver}
|
||||||
Requires: python3-pyparted >= %{pypartedver}
|
Requires: python3-pyparted >= %{pypartedver}
|
||||||
@ -117,6 +113,40 @@ make DESTDIR=%{buildroot} install
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 10 2024 Vojtech Trefny <vtrefny@redhat.com> - 3.10.0-1
|
||||||
|
- Added support for PV grow (japokorn)
|
||||||
|
- misc: Add stratis-cli and stratisd to test dependencies (vtrefny)
|
||||||
|
- tests: Add a base class for stratis tests (vtrefny)
|
||||||
|
- Add a Stratis example with pool encryption using Clevis/Tang (vtrefny)
|
||||||
|
- Clear VG UUID from PVs after removing the PV (#2278058) (vtrefny)
|
||||||
|
- Use longer timeout for Stratis DBus calls (vtrefny)
|
||||||
|
- safe-dbus: Allow using custom timeouts for the DBus calls (vtrefny)
|
||||||
|
- Catch JSONDecodeError when parsing Stratis Clevis info (vtrefny)
|
||||||
|
- Add support for unlocking locked Stratis pools with Clevis (vtrefny)
|
||||||
|
- Add support for creating encrypted Stratis pool with Clevis (vtrefny)
|
||||||
|
- Round Stratis Filesystem size down to the nearest sector (vtrefny)
|
||||||
|
- Make sure to include stderr when gathering output of stratis tools (vtrefny)
|
||||||
|
- Add support for adding new members to existing Stratis pool (vtrefny)
|
||||||
|
- Base StratisPoolDevice on ContainerDevice instead of StorageDevice (vtrefny)
|
||||||
|
- Ignore invalid/empty UUIDs for NVMe namespaces (vtrefny)
|
||||||
|
- lvm: Use more generic exception for inconsistent PV sector sizes (vtrefny)
|
||||||
|
- Do not allow creating stratis pools with different sector sizes (vtrefny)
|
||||||
|
- availability: Fix starting DBus services (vtrefny)
|
||||||
|
- fstab: Use 'mount_type' when writing filesystem type to fstab (vtrefny)
|
||||||
|
- Add basic support for BitLocker devices (vtrefny)
|
||||||
|
- nvme: Skip startup/write when NVMe plugin isn't available (vtrefny)
|
||||||
|
- Fix scanning partitions on RAID arrays (#2269133) (vtrefny)
|
||||||
|
- Add a test case with DDF BIOS RAID array (vtrefny)
|
||||||
|
- tests: Try to get distro and version from /etc/os-release (vtrefny)
|
||||||
|
- availability: Fix checking for DBus service availability (vtrefny)
|
||||||
|
- ci: Update packit configuration for 3.10-devel (vtrefny)
|
||||||
|
- Remove vim formatting comments (vtrefny)
|
||||||
|
- tests: Do not ignore entire test files in pylint (vtrefny)
|
||||||
|
- tests: Do not try to import mock and patch from mock (vtrefny)
|
||||||
|
- Remove util.stringize and unicodeize functions (vtrefny)
|
||||||
|
- Remove Python SIX usage (vtrefny)
|
||||||
|
- Remove unused flags and do not read flags from boot command line (vtrefny)
|
||||||
|
|
||||||
* Mon Feb 12 2024 Vojtech Trefny <vtrefny@redhat.com> - 3.9.0-3
|
* Mon Feb 12 2024 Vojtech Trefny <vtrefny@redhat.com> - 3.9.0-3
|
||||||
- Fix UnboundLocalError in MD populator (#2263668)
|
- Fix UnboundLocalError in MD populator (#2263668)
|
||||||
|
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (blivet-3.9.0-tests.tar.gz) = 8b332fd68f025b7fccb6701e763fd948ab80ae6facd031bfbbdc0c29337db6ba428d6e379e3135d5e79c14ef475c8947a6bd57a31f33c07a9705b0b937a08c4d
|
SHA512 (blivet-3.10.0.tar.gz) = 74172dec98a1b4f71cee6d64d46cdafa5116cfbbaddfdaed3dd118fef019dce54ff9d9206faada5991efac6b61bc558bb3050165f1d68bde1c1ec228c01916c8
|
||||||
SHA512 (blivet-3.9.0.tar.gz) = 76d064bfe5087f0243f6bbd58b47f5be9b4e1f519be7feddf15b05f717b96725178b4025efec4721f4090f0bb8dc5c1199abcfe6be8d112f58af54091af44eaa
|
SHA512 (blivet-3.10.0-tests.tar.gz) = 53d2f37ff9822141caf669889835069da6e3f728761c0d006afcf80a2628f8816cbf558d30a085082e1bfec2e4b575f9ea78859a17f4e0bf7458e3faba158ef7
|
||||||
|
1
tests/.fmf/version
Normal file
1
tests/.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
42
tests/lvm_factory.py
Normal file
42
tests/lvm_factory.py
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import blivet
|
||||||
|
|
||||||
|
|
||||||
|
POOL_NAME = "blivet_test"
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('-d', '--disks', default='')
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
b = blivet.Blivet()
|
||||||
|
b.reset()
|
||||||
|
|
||||||
|
disks = list()
|
||||||
|
for disk_id in args.disks.split(','):
|
||||||
|
disk = b.devicetree.resolve_device(disk_id)
|
||||||
|
if not disk.is_disk:
|
||||||
|
sys.stderr.write("specified disk '%s' is not a disk\n" % disk_id)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
disks.append(disk)
|
||||||
|
b.initialize_disk(disk)
|
||||||
|
|
||||||
|
if len(disks) > 1:
|
||||||
|
container_raid_level = "raid1"
|
||||||
|
total_size = min(d.size for d in disks)
|
||||||
|
else:
|
||||||
|
container_raid_level = None
|
||||||
|
total_size = sum(d.size for d in disks)
|
||||||
|
|
||||||
|
lv1 = b.factory_device(size=total_size*0.8, disks=disks,
|
||||||
|
name="lv1", container_name=POOL_NAME,
|
||||||
|
fstype='xfs', device_type=blivet.devicefactory.DEVICE_TYPE_LVM)
|
||||||
|
lv2 = b.factory_device(disks=disks, name="lv2",
|
||||||
|
container_name=POOL_NAME, container_raid_level='raid1',
|
||||||
|
fstype='ext4', device_type=blivet.devicefactory.DEVICE_TYPE_LVM)
|
||||||
|
|
||||||
|
b.do_it()
|
8
tests/provision.fmf
Normal file
8
tests/provision.fmf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
standard-inventory-qcow2:
|
||||||
|
qemu:
|
||||||
|
m: 1G
|
||||||
|
drive:
|
||||||
|
- size: 10737418240
|
||||||
|
- size: 10737418240
|
25
tests/tests.yml
Normal file
25
tests/tests.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# - hosts: localhost
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- role: standard-test-source
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- atomic
|
||||||
|
- classic
|
||||||
|
required_packages:
|
||||||
|
- python3
|
||||||
|
- python3-dbus
|
||||||
|
- libblockdev-plugins-all
|
||||||
|
- python3-yaml
|
||||||
|
- targetcli
|
||||||
|
- stratis-cli
|
||||||
|
- stratisd
|
||||||
|
tests:
|
||||||
|
- unit-tests:
|
||||||
|
dir: .
|
||||||
|
run: ./unit_testing.sh
|
||||||
|
|
11
tests/unit_testing.sh
Normal file
11
tests/unit_testing.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Bail out if anything goes wrong
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Get path to blivet
|
||||||
|
blivet_path=$(find /usr/ -path */site-packages | tr '\n' ':')
|
||||||
|
|
||||||
|
# Run upstream unit tests
|
||||||
|
cd ./source/
|
||||||
|
PYTHONPATH=$blivet_path python3 tests/run_tests.py
|
Loading…
Reference in New Issue
Block a user