Ensure correct type of mpath cache member list

This commit is contained in:
Vojtech Trefny 2019-03-21 15:11:26 +01:00
parent 6cce14855c
commit 659178a944
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From d01281a69e317d7bae4a7698edb6583b6310d5c1 Mon Sep 17 00:00:00 2001
From: David Lehman <dlehman@redhat.com>
Date: Tue, 19 Mar 2019 11:51:47 -0400
Subject: [PATCH] Ensure correct type of mpath cache member list.
Related: rhbz#1672971
---
blivet/static_data/mpath_info.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/blivet/static_data/mpath_info.py b/blivet/static_data/mpath_info.py
index 49ba4709..64958ba8 100644
--- a/blivet/static_data/mpath_info.py
+++ b/blivet/static_data/mpath_info.py
@@ -42,8 +42,11 @@ def is_mpath_member(self, device):
:param str device: path of the device to query
"""
- if self._members is None and availability.BLOCKDEV_MPATH_PLUGIN.available:
- self._members = set(blockdev.mpath.get_mpath_members())
+ if self._members is None:
+ if availability.BLOCKDEV_MPATH_PLUGIN.available:
+ self._members = set(blockdev.mpath.get_mpath_members())
+ else:
+ self._members = set()
device = os.path.realpath(device)
device = device[len("/dev/"):]

View File

@ -23,7 +23,7 @@ Version: 3.1.2
#%%global prerelease .b2
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 3%{?prerelease}%{?dist}
Release: 4%{?prerelease}%{?dist}
Epoch: 1
License: LGPLv2+
Group: System Environment/Libraries
@ -33,6 +33,7 @@ Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realver
Patch0: 0001-force-lvm-plugin.patch
Patch1: 0002-Dont-crash-if-blockdev-mpath-plugin-isnt-available.patch
Patch2: 0003-Support-legacy-MBR-as-part-of-UEFI.patch
Patch3: 0004-Ensure-correct-type-of-mpath-cache-member-list.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -193,6 +194,9 @@ configuration.
%endif
%changelog
* Thu Mar 21 2019 Vojtech Trefny <vtrefny@redhat.com> - 3.1.2-4
- Ensure correct type of mpath cache member list
* Mon Mar 11 2019 Vojtech Trefny <vtrefny@redhat.com> - 3.1.2-3
- Support legacy MBR (msdos) as part of UEFI to enable hybrid builds