Blame SOURCES/0014-Do-not-crash-when-changing-disklabel-on-disks-with-a.patch

f45bfb
From 78eda3d74110dbf9669c3271f7d2fddf962d0381 Mon Sep 17 00:00:00 2001
f45bfb
From: Vojtech Trefny <vtrefny@redhat.com>
f45bfb
Date: Thu, 28 Apr 2022 14:13:04 +0200
f45bfb
Subject: [PATCH] Do not crash when changing disklabel on disks with active
f45bfb
 devices
f45bfb
f45bfb
The _find_active_devices_on_action_disks function originally
f45bfb
prevented from making any changes on disks with active devices
f45bfb
(active LVs, mounted partitions etc.)  This was changed in
f45bfb
b72e957d2b23444824316331ae21d1c594371e9c and the check currently
f45bfb
prevents only reformatting the disklabel on such disks which
f45bfb
should be already impossible on disks with an existing partition.
f45bfb
f45bfb
This change for the 3.4 stable branch keeps the current behaviour
f45bfb
where the active devices are teared down when running in installer
f45bfb
mode to avoid potential issues with the installer.
f45bfb
f45bfb
Resolves: rhbz#2078801
f45bfb
---
f45bfb
 blivet/actionlist.py | 5 ++---
f45bfb
 1 file changed, 2 insertions(+), 3 deletions(-)
f45bfb
f45bfb
diff --git a/blivet/actionlist.py b/blivet/actionlist.py
f45bfb
index d03e32b9..4ec2dbf8 100644
f45bfb
--- a/blivet/actionlist.py
f45bfb
+++ b/blivet/actionlist.py
f45bfb
@@ -211,9 +211,8 @@ class ActionList(object):
f45bfb
                     except StorageError as e:
f45bfb
                         log.info("teardown of %s failed: %s", device.name, e)
f45bfb
             else:
f45bfb
-                raise RuntimeError("partitions in use on disks with changes "
f45bfb
-                                   "pending: %s" %
f45bfb
-                                   ",".join(problematic))
f45bfb
+                log.debug("ignoring devices in use on disks with changes: %s",
f45bfb
+                          ",".join(problematic))
f45bfb
 
f45bfb
         log.info("resetting parted disks...")
f45bfb
         for device in devices:
f45bfb
-- 
f45bfb
2.35.3
f45bfb