python-blivet/0019-Do-not-crash-when-changing-disklabel-on-disks-with-a.patch
Jan Pokorny a25a6f4296 Blivet 3.4.0-13
- Fix getting PV info in LVMPhysicalVolume from the cache
  Resolves: rhbz#2079221
- Do not crash when changing disklabel on disks with active devices
  Resolves: rhbz#2078803
- ActionDestroyDevice should not obsolete ActionRemoveMember
  Resolves: rhbz#2076956
- Correctly set vg_name after adding/removing a PV from a VG
  Resolves: rhbz#2081278
- Add support for creating LVM cache pools
  Resolves: rhbz#2055200
- Use LVM PV format current_size in LVMVolumeGroupDevice._remove
  Related: rhbz#2081278
2022-06-02 14:12:08 +02:00

42 lines
1.6 KiB
Diff

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