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