When starting stratis pool always call StartPool with FD list

Resolves: RHEL-177473
This commit is contained in:
Vojtech Trefny 2026-05-29 14:40:11 +02:00
parent 1a4b1c7e32
commit 977f573c5f
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From 9c449967523e3c12391fb7d341ea7b10b87e3712 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Thu, 14 May 2026 17:11:20 +0200
Subject: [PATCH] When starting stratis pool always call StartPool with FD list
Stratis 3.9.0 switched to zbus which seems to be more strict when
validating parameters and requires the file destriptor list to be
always present, even when not used e.g. when "unlock_method" is
set to False for StartPool.
Using the GLibClientUnix client makes sure the FD list is passed
to the DBus call and we also need to set a valid index to the
list instead of -1.
Resolves: RHEL-177473
---
blivet/devicelibs/stratis.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/blivet/devicelibs/stratis.py b/blivet/devicelibs/stratis.py
index a7c2e6a3a..981dfe688 100644
--- a/blivet/devicelibs/stratis.py
+++ b/blivet/devicelibs/stratis.py
@@ -196,7 +196,7 @@ def _unlock_pool_new(pool_uuid, method=None, passphrase=None, keyfile=None):
key_arg = (True, UnixFD(fd))
else:
- key_arg = (False, -1)
+ key_arg = (False, 0)
try:
proxy = util.SystemBus.get_proxy(STRATIS_SERVICE, STRATIS_PATH, STRATIS_MANAGER_INTF_R8,
@@ -364,8 +364,9 @@ def start_pool(pool_uuid):
stratis_info.drop_cache()
try:
- proxy = util.SystemBus.get_proxy(STRATIS_SERVICE, STRATIS_PATH, STRATIS_MANAGER_INTF_R8)
- ((succ, _uuid), rc, err) = proxy.StartPool(pool_uuid, "uuid", (False, (False, 0)), (False, -1),
+ proxy = util.SystemBus.get_proxy(STRATIS_SERVICE, STRATIS_PATH, STRATIS_MANAGER_INTF_R8,
+ client=GLibClientUnix)
+ ((succ, _uuid), rc, err) = proxy.StartPool(pool_uuid, "uuid", (False, (False, 0)), (False, 0),
timeout=STRATIS_CALL_TIMEOUT)
except DBusError as e:
raise StratisError("Failed to start stratis pool '%s': %s" % (pool_uuid, str(e)))

View File

@ -5,7 +5,7 @@ Version: 3.13.0
#%%global prerelease .b2
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 7%{?prerelease}%{?dist}
Release: 8%{?prerelease}%{?dist}
Epoch: 1
License: LGPL-2.1-or-later
%global realname blivet
@ -22,6 +22,7 @@ Patch3: 0003-Fix-luks-save_passphrase-for-missing-format-context.patch
Patch4: 0004-Fix-getting-iSCSI-firmware-initiator-name.patch
Patch5: 0005-Account-for-unusable-space-in-the-PV-in-LVMFactory.patch
Patch6: 0006-Fix-PV-overhead-calculation-in-LVMFactory-_get_total_space.patch
Patch7: 0007-When-starting-stratis-pool-always-call-StartPool-with-FD-list.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -119,6 +120,10 @@ make DESTDIR=%{buildroot} install
%{python3_sitelib}/*
%changelog
* Fri May 29 2026 Vojtech Trefny <vtrefny@redhat.com> - 3.13.0-8
- When starting stratis pool always call StartPool with FD list
Resolves: RHEL-177473
* Mon May 18 2026 Vojtech Trefny <vtrefny@redhat.com> - 3.13.0-7
- Fix PV overhead calculation in LVMFactory._get_total_space
Resolves: RHEL-45174