|
|
34c36b |
From cd85b0a41f16c571675f04c58ec4c1a428a88a61 Mon Sep 17 00:00:00 2001
|
|
|
34c36b |
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
|
34c36b |
Date: Thu, 16 Aug 2018 13:00:35 +0200
|
|
|
34c36b |
Subject: [PATCH] Create a separate availability check for dmraid support
|
|
|
34c36b |
|
|
|
34c36b |
Resolves: rhbz#1617958
|
|
|
34c36b |
---
|
|
|
34c36b |
blivet/devices/disk.py | 2 +-
|
|
|
34c36b |
blivet/tasks/availability.py | 9 +++++++--
|
|
|
34c36b |
2 files changed, 8 insertions(+), 3 deletions(-)
|
|
|
34c36b |
|
|
|
34c36b |
diff --git a/blivet/devices/disk.py b/blivet/devices/disk.py
|
|
|
34c36b |
index 5b52330..012413c 100644
|
|
|
34c36b |
--- a/blivet/devices/disk.py
|
|
|
34c36b |
+++ b/blivet/devices/disk.py
|
|
|
34c36b |
@@ -225,7 +225,7 @@ class DMRaidArrayDevice(DMDevice, ContainerDevice):
|
|
|
34c36b |
_is_disk = True
|
|
|
34c36b |
_format_class_name = property(lambda s: "dmraidmember")
|
|
|
34c36b |
_format_uuid_attr = property(lambda s: None)
|
|
|
34c36b |
- _external_dependencies = [availability.BLOCKDEV_DM_PLUGIN]
|
|
|
34c36b |
+ _external_dependencies = [availability.BLOCKDEV_DM_PLUGIN_RAID]
|
|
|
34c36b |
|
|
|
34c36b |
def __init__(self, name, fmt=None,
|
|
|
34c36b |
size=None, parents=None, sysfs_path='', wwn=None):
|
|
|
34c36b |
diff --git a/blivet/tasks/availability.py b/blivet/tasks/availability.py
|
|
|
34c36b |
index 24909a2..7f64c10 100644
|
|
|
34c36b |
--- a/blivet/tasks/availability.py
|
|
|
34c36b |
+++ b/blivet/tasks/availability.py
|
|
|
34c36b |
@@ -331,10 +331,14 @@ BLOCKDEV_DM_ALL_MODES = (blockdev.DMTechMode.CREATE_ACTIVATE |
|
|
|
34c36b |
blockdev.DMTechMode.QUERY)
|
|
|
34c36b |
BLOCKDEV_DM = BlockDevTechInfo(plugin_name="dm",
|
|
|
34c36b |
check_fn=blockdev.dm_is_tech_avail,
|
|
|
34c36b |
- technologies={blockdev.DMTech.MAP: BLOCKDEV_DM_ALL_MODES,
|
|
|
34c36b |
- blockdev.DMTech.RAID: BLOCKDEV_DM_ALL_MODES})
|
|
|
34c36b |
+ technologies={blockdev.DMTech.MAP: BLOCKDEV_DM_ALL_MODES})
|
|
|
34c36b |
BLOCKDEV_DM_TECH = BlockDevMethod(BLOCKDEV_DM)
|
|
|
34c36b |
|
|
|
34c36b |
+BLOCKDEV_DM_RAID = BlockDevTechInfo(plugin_name="dm",
|
|
|
34c36b |
+ check_fn=blockdev.dm_is_tech_avail,
|
|
|
34c36b |
+ technologies={blockdev.DMTech.RAID: BLOCKDEV_DM_ALL_MODES})
|
|
|
34c36b |
+BLOCKDEV_DM_TECH_RAID = BlockDevMethod(BLOCKDEV_DM_RAID)
|
|
|
34c36b |
+
|
|
|
34c36b |
# libblockdev loop plugin required technologies and modes
|
|
|
34c36b |
BLOCKDEV_LOOP_ALL_MODES = (blockdev.LoopTechMode.CREATE |
|
|
|
34c36b |
blockdev.LoopTechMode.CREATE |
|
|
|
34c36b |
@@ -399,6 +403,7 @@ BLOCKDEV_SWAP_TECH = BlockDevMethod(BLOCKDEV_SWAP)
|
|
|
34c36b |
BLOCKDEV_BTRFS_PLUGIN = blockdev_plugin("btrfs", BLOCKDEV_BTRFS_TECH)
|
|
|
34c36b |
BLOCKDEV_CRYPTO_PLUGIN = blockdev_plugin("crypto", BLOCKDEV_CRYPTO_TECH)
|
|
|
34c36b |
BLOCKDEV_DM_PLUGIN = blockdev_plugin("dm", BLOCKDEV_DM_TECH)
|
|
|
34c36b |
+BLOCKDEV_DM_PLUGIN_RAID = blockdev_plugin("dm", BLOCKDEV_DM_TECH_RAID)
|
|
|
34c36b |
BLOCKDEV_LOOP_PLUGIN = blockdev_plugin("loop", BLOCKDEV_LOOP_TECH)
|
|
|
34c36b |
BLOCKDEV_LVM_PLUGIN = blockdev_plugin("lvm", BLOCKDEV_LVM_TECH)
|
|
|
34c36b |
BLOCKDEV_MDRAID_PLUGIN = blockdev_plugin("mdraid", BLOCKDEV_MD_TECH)
|
|
|
34c36b |
--
|
|
|
34c36b |
1.8.3.1
|
|
|
34c36b |
|