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

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