Fix name resolution for md member partitions. (#1798792)

This commit is contained in:
Vojtech Trefny 2020-03-11 09:42:15 +01:00
parent 0600813ae8
commit 6523462fbd
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,22 @@
From 97cdeb7ba3db01bcd510b35a44b21549703fe545 Mon Sep 17 00:00:00 2001
From: David Lehman <dlehman@redhat.com>
Date: Tue, 30 Apr 2019 12:49:39 -0400
Subject: [PATCH] Fix name resolution for md member partitions. (#1798792)
---
blivet/udev.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/udev.py b/blivet/udev.py
index 5063e733..7ebdbcb9 100644
--- a/blivet/udev.py
+++ b/blivet/udev.py
@@ -202,7 +202,7 @@ def device_get_name(udev_info):
""" Return the best name for a device based on the udev db data. """
if "DM_NAME" in udev_info:
name = udev_info["DM_NAME"]
- elif "MD_DEVNAME" in udev_info:
+ elif "MD_DEVNAME" in udev_info and os.path.exists(device_get_sysfs_path(udev_info) + "/md"):
mdname = udev_info["MD_DEVNAME"]
if device_is_partition(udev_info):
# for partitions on named RAID we want to use the raid name, not

View File

@ -23,13 +23,14 @@ Version: 3.2.0
#%%global prerelease .b2 #%%global prerelease .b2
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 2%{?prerelease}%{?dist} Release: 3%{?prerelease}%{?dist}
Epoch: 1 Epoch: 1
License: LGPLv2+ License: LGPLv2+
%global realname blivet %global realname blivet
%global realversion %{version}%{?prerelease} %global realversion %{version}%{?prerelease}
Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz
Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}-tests.tar.gz Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}-tests.tar.gz
Patch0: 0001-Fix-name-resolution-for-md-member-partitions.patch
# Versions of required components (done so we make sure the buildrequires # Versions of required components (done so we make sure the buildrequires
# match the requires versions of things). # match the requires versions of things).
@ -191,6 +192,9 @@ configuration.
%endif %endif
%changelog %changelog
* Wed Mar 11 2020 Vojtech Trefny <vtrefny@redhat.com> - 3.2.0-3
- Fix name resolution for md member partitions. (#1798792)
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.2.0-2 * Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild