Remove teardown_all from the populate method (vponcova)

initial PowerNV class support (dan)
This commit is contained in:
Vojtech Trefny 2019-07-11 12:42:30 +02:00
parent 3677bf5c51
commit 8f242a3df5
3 changed files with 66 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From fcc941289541a6667445b4c2104b697933b867e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 7 Jun 2019 09:31:01 +0200
Subject: [PATCH] initial PowerNV class support
---
blivet/arch.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/blivet/arch.py b/blivet/arch.py
index 55ce8108..2cd978e9 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -72,7 +72,7 @@ def get_ppc_machine():
'Cell': 'pSeries',
'Momentum': 'pSeries',
'PS3': 'PS3',
- 'PowerNV': 'pSeries'
+ 'PowerNV': 'PowerNV'
}
machine = None
platform = None
@@ -330,6 +330,10 @@ def is_ipseries():
return is_ppc() and get_ppc_machine() in ("iSeries", "pSeries")
+def is_powernv():
+ return is_ppc() and get_ppc_machine() == "PowerNV"
+
+
def get_arch():
"""
:return: The hardware architecture

View File

@ -0,0 +1,26 @@
From 0910d469af8158a37cc6f103a22bd368c99cfb20 Mon Sep 17 00:00:00 2001
From: Vendula Poncova <vponcova@redhat.com>
Date: Wed, 12 Jun 2019 13:39:13 +0200
Subject: [PATCH] Remove teardown_all from the populate method
It is not possible to protect devices from teardown when the
auto_dev_updates flag is set. So let's remove teardown_all from
the populate method and let users to do that.
---
blivet/populator/populator.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/blivet/populator/populator.py b/blivet/populator/populator.py
index ebe205e6..465c272d 100644
--- a/blivet/populator/populator.py
+++ b/blivet/populator/populator.py
@@ -416,9 +416,6 @@ def populate(self, cleanup_only=False):
parted.clear_exn_handler()
self._hide_ignored_disks()
- if flags.auto_dev_updates:
- self.teardown_all()
-
def _populate(self):
log.info("DeviceTree.populate: ignored_disks is %s ; exclusive_disks is %s",
self.ignored_disks, self.exclusive_disks)

View File

@ -23,13 +23,15 @@ Version: 3.1.4
#%%global prerelease .b2
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 1%{?prerelease}%{?dist}
Release: 2%{?prerelease}%{?dist}
Epoch: 1
License: LGPLv2+
%global realname blivet
%global realversion %{version}%{?prerelease}
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
Patch0: 0001-initial-PowerNV-class-support.patch
Patch1: 0002-Remove-teardown_all-from-the-populate-method.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -191,6 +193,10 @@ configuration.
%endif
%changelog
* Thu Jul 11 2019 Vojtech Trefny <vtrefny@redhat.com> - 3.1.4-2
- Remove teardown_all from the populate method (vponcova)
- initial PowerNV class support (dan)
* Tue Jun 11 2019 Vojtech Trefny <vtrefny@redhat.com> - 3.1.4-1
- Don't call fnmatch with None (#1698937) (vponcova)
- Do not crash on non-int lun argument when creating iscsi disk object. (rvykydal)