代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 373da9db5d1c7d138f87abfb69165bd9de413a41 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Mon, 13 Jul 2020 14:53:42 +0200
Subject: [PATCH] Fix creating cached LVs on encrypted PVs
We need to get the child device for encrypted PVs because the PV
devices from kickstart are the underlying partitions, not the
lvmpv formatted LUKS devices.
Resolves: rhbz#1855973
---
.../partitioning/custom/custom_partitioning.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/modules/storage/partitioning/custom/custom_partitioning.py b/pyanaconda/modules/storage/partitioning/custom/custom_partitioning.py
index 754a48e2e..17c125dd6 100644
--- a/pyanaconda/modules/storage/partitioning/custom/custom_partitioning.py
+++ b/pyanaconda/modules/storage/partitioning/custom/custom_partitioning.py
@@ -851,6 +851,16 @@ class CustomPartitioningTask(NonInteractivePartitioningTask):
if data.logvol.lvList:
grow_lvm(storage)
+ def _get_cache_pv_devices(self, devicetree, logvol_data):
+ pv_devices = []
+ for pvname in logvol_data.cache_pvs:
+ pv = lookup_alias(devicetree, pvname)
+ if pv.format.type == "luks":
+ pv_devices.append(pv.children[0])
+ else:
+ pv_devices.append(pv)
+ return pv_devices
+
def _execute_logvol_data(self, storage, data, logvol_data):
"""Execute the logvol data.
@@ -927,7 +937,7 @@ class CustomPartitioningTask(NonInteractivePartitioningTask):
# If cache PVs specified, check that they belong to the same VG this LV is a member of
if logvol_data.cache_pvs:
- pv_devices = (lookup_alias(devicetree, pv) for pv in logvol_data.cache_pvs)
+ pv_devices = self._get_cache_pv_devices(devicetree, logvol_data)
if not all(pv in vg.pvs for pv in pv_devices):
raise KickstartParseError(
_("Cache PVs must belong to the same VG as the cached LV"),
@@ -1096,7 +1106,7 @@ class CustomPartitioningTask(NonInteractivePartitioningTask):
maxsize = None
if logvol_data.cache_size and logvol_data.cache_pvs:
- pv_devices = [lookup_alias(devicetree, pv) for pv in logvol_data.cache_pvs]
+ pv_devices = self._get_cache_pv_devices(devicetree, logvol_data)
cache_size = Size("%d MiB" % logvol_data.cache_size)
cache_mode = logvol_data.cache_mode or None
cache_request = LVMCacheRequest(cache_size, pv_devices, cache_mode)
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。