!40 规避issue:I3UPRP,blivet代码从dict中取数据前未判断元素是否在dict中,导致语言级报错
From: @bitcoffee Reviewed-by: @orange-snn Signed-off-by: @orange-snn
This commit is contained in:
commit
b9aab5f8e4
@ -0,0 +1,26 @@
|
|||||||
|
From c9ddcf46a10738017fb442025c25863c25c20142 Mon Sep 17 00:00:00 2001
|
||||||
|
From: bitcoffeeiux <liuxin264@huawei.com>
|
||||||
|
Date: Fri, 4 Jun 2021 04:27:53 +0800
|
||||||
|
Subject: [PATCH] function allocate_partitions threw an exception
|
||||||
|
while adding /boot partitions to a RAID disk
|
||||||
|
|
||||||
|
---
|
||||||
|
blivet/partitioning.py | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/blivet/partitioning.py b/blivet/partitioning.py
|
||||||
|
index 53f9cc3..0b544be 100644
|
||||||
|
--- a/blivet/partitioning.py
|
||||||
|
+++ b/blivet/partitioning.py
|
||||||
|
@@ -764,6 +764,8 @@ def allocate_partitions(storage, disks, partitions, freespace, boot_disk=None):
|
||||||
|
growth = 0 # in sectors
|
||||||
|
# loop through disks
|
||||||
|
for _disk in req_disks:
|
||||||
|
+ if _disk.path not in disklabels:
|
||||||
|
+ continue
|
||||||
|
disklabel = disklabels[_disk.path]
|
||||||
|
best = None
|
||||||
|
current_free = free
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: python-blivet
|
Name: python-blivet
|
||||||
Version: 3.3.2
|
Version: 3.3.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: A python module for system storage configuration
|
Summary: A python module for system storage configuration
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -19,6 +19,7 @@ BuildRequires: python2-devel python2-setuptools
|
|||||||
|
|
||||||
Patch0: 0001-force-lvm-plugin.patch
|
Patch0: 0001-force-lvm-plugin.patch
|
||||||
Patch1: fix-the-long-hostname.patch
|
Patch1: fix-the-long-hostname.patch
|
||||||
|
Patch9000: huawei-fix-allocate-partitions-threw-exception-when-raid.patch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -120,6 +121,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
|
|||||||
%doc README.md
|
%doc README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 10 2021 liuxin <liuxin264@huawei.com> - 3.3.2-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix allocate_partitions threw an exception while adding /boot to RAID disk
|
||||||
|
|
||||||
* Wed Feb 03 2021 gaihuiying <gaihuiying1@huawei.com> - 3.3.2-1
|
* Wed Feb 03 2021 gaihuiying <gaihuiying1@huawei.com> - 3.3.2-1
|
||||||
- Type:requirement
|
- Type:requirement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user