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