repair bug

This commit is contained in:
bitcoffee 2021-06-04 04:31:37 +08:00
parent 8c7b472cf0
commit e26f6c7225
2 changed files with 34 additions and 1 deletions

View File

@ -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

View File

@ -3,7 +3,7 @@
Name: python-blivet
Version: 3.3.2
Release: 1
Release: 2
Epoch: 1
Summary: A python module for system storage configuration
License: LGPLv2+
@ -19,6 +19,7 @@ BuildRequires: python2-devel python2-setuptools
Patch0: 0001-force-lvm-plugin.patch
Patch1: fix-the-long-hostname.patch
Patch9000: huawei-fix-allocate-partitions-threw-exception-when-raid.patch
%description
@ -120,6 +121,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%doc README.md
%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
- Type:requirement
- ID:NA