!61 upgrade to 3.4.2

Merge pull request !61 from yangcheng1203/master
This commit is contained in:
openeuler-ci-bot 2021-12-17 06:30:16 +00:00 committed by Gitee
commit 76f680ebc4
6 changed files with 6 additions and 86 deletions

View File

@ -1,57 +0,0 @@
From 18167263c3bfd3a99a38fc88a7e139a313c249e7 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Mon, 24 May 2021 14:49:12 +0200
Subject: [PATCH] Convert LVM filter lists to sets
To prevent devices being added multiple times and removed only
once.
Related: rhbz#1955942
---
blivet/devicelibs/lvm.py | 12 ++++++------
tests/devicetree_test.py | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
index d56a76edc..c4b237a2c 100644
--- a/blivet/devicelibs/lvm.py
+++ b/blivet/devicelibs/lvm.py
@@ -70,8 +70,8 @@
# Theoretically we can handle all that can be handled with the LVM --config
# argument. For every time we call an lvm_cc (lvm compose config) funciton
# we regenerate the config_args with all global info.
-config_args_data = {"filterRejects": [], # regular expressions to reject.
- "filterAccepts": []} # regexp to accept
+config_args_data = {"filterRejects": set(), # regular expressions to reject.
+ "filterAccepts": set()} # regexp to accept
def _set_global_config():
@@ -119,7 +119,7 @@ def fn_with_refresh(*args, **kwargs):
def lvm_cc_addFilterRejectRegexp(regexp):
""" Add a regular expression to the --config string."""
log.debug("lvm filter: adding %s to the reject list", regexp)
- config_args_data["filterRejects"].append(regexp)
+ config_args_data["filterRejects"].add(regexp)
@needs_config_refresh
@@ -128,15 +128,15 @@ def lvm_cc_removeFilterRejectRegexp(regexp):
log.debug("lvm filter: removing %s from the reject list", regexp)
try:
config_args_data["filterRejects"].remove(regexp)
- except ValueError:
+ except KeyError:
log.debug("%s wasn't in the reject list", regexp)
return
@needs_config_refresh
def lvm_cc_resetFilter():
- config_args_data["filterRejects"] = []
- config_args_data["filterAccepts"] = []
+ config_args_data["filterRejects"] = set()
+ config_args_data["filterAccepts"] = set()
def determine_parent_lv(internal_lv, lvs, lv_info):

View File

@ -1,24 +0,0 @@
From f0862e211eb9949dea1a5ccb151e7d099b9585e6 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Mon, 24 May 2021 13:35:39 +0200
Subject: [PATCH] Remove action device from LVM reject list
Because the device doesn't depend on itself the existing code
won't remove the device we are trying to modify from the list.
Resolves: rhbz#1955942
---
blivet/actionlist.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/blivet/actionlist.py b/blivet/actionlist.py
index d03e32b95..2de3fed33 100644
--- a/blivet/actionlist.py
+++ b/blivet/actionlist.py
@@ -260,6 +260,7 @@ def _pre_process(self, devices=None):
log.debug("action: %s", action)
# Remove lvm filters for devices we are operating on
+ lvm.lvm_cc_removeFilterRejectRegexp(action.device.name)
for device in (d for d in devices if d.depends_on(action.device)):
lvm.lvm_cc_removeFilterRejectRegexp(device.name)

Binary file not shown.

BIN
blivet-3.4.2.tar.gz Normal file

Binary file not shown.

View File

@ -2,8 +2,8 @@
%bcond_without python3
Name: python-blivet
Version: 3.3.2
Release: 4
Version: 3.4.2
Release: 1
Epoch: 1
Summary: A python module for system storage configuration
License: LGPLv2+
@ -19,9 +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
Patch6000: backport-Convert-LVM-filter-lists-to-sets.patch
Patch6001: backport-Remove-action-device-from-LVM-reject-list.patch
Patch9000: fix-allocate-partitions-threw-exception-when-raid.patch
@ -124,6 +122,9 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%doc README.md
%changelog
* Wed Dec 15 2021 yangcheng <yangcheng87@huawei.com> - 3.4.2-1
- DESC:Upgrade to 3.4.2
* Fri Dec 10 2021 yanan <yanan@huawei.com> - 3.3.2-4
- Type:bugfix
- ID:NA