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