Accepting request 963102 from Base:System

- skip RAID assembly if DM_UDEV_DISABLE_OTHER_RULES_FLAG (bsc#1196054)
  * Add 0120-udev-md-raid-assembly.rules-skip-if-DM_UDEV_DISABLE_.patch

OBS-URL: https://build.opensuse.org/request/show/963102
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mdadm?expand=0&rev=132
This commit is contained in:
Dominique Leuenberger 2022-03-22 18:36:12 +00:00 committed by Git OBS Bridge
commit b692bd7fd5
3 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From 9e67cb85d6d2aeab773aab56b8b6cdf5b37c1a4e Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Wed, 16 Feb 2022 21:48:52 +0100
Subject: [PATCH] udev-md-raid-assembly.rules: skip if
DM_UDEV_DISABLE_OTHER_RULES_FLAG
device-mapper sets the flag DM_UDEV_DISABLE_OTHER_RULES_FLAG to 1 for
devices which are unusable. They may be no set up yet, suspended, or
otherwise unusable (e.g. multipath maps without usable path). This
flag does not necessarily imply SYSTEMD_READY=0 and must therefore
be tested separately.
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
udev-md-raid-assembly.rules | 3 +++
1 file changed, 3 insertions(+)
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
index d668cdd..bc9679f 100644
--- a/udev-md-raid-assembly.rules
+++ b/udev-md-raid-assembly.rules
@@ -9,6 +9,9 @@ SUBSYSTEM!="block", GOTO="md_inc_end"
# skip non-initialized devices
ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end"
+# device mapper sets DM_UDEV_DISABLE_OTHER_RULES_FLAG for devices which
+# aren't ready to use
+KERNEL=="dm-*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="md_inc_end"
# handle potential components of arrays (the ones supported by md)
ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
--
2.35.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 18 22:48:41 UTC 2022 - Martin Wilck <mwilck@suse.com>
- skip RAID assembly if DM_UDEV_DISABLE_OTHER_RULES_FLAG (bsc#1196054)
* Add 0120-udev-md-raid-assembly.rules-skip-if-DM_UDEV_DISABLE_.patch
-------------------------------------------------------------------
Tue Nov 23 08:42:24 UTC 2021 - Stefan Weiberg <sweiberg@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package mdadm
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -158,6 +158,7 @@ Patch116: 0116-imsm-nvme-multipath-support.patch
Patch117: 0117-Grow-be-careful-of-corrupt-dev_roles-list.patch
Patch118: 0118-Remove-Spare-drives-line-from-details-for-external-m.patch
Patch119: 0119-Don-t-associate-spares-with-other-arrays-during-RAID.patch
Patch120: 0120-udev-md-raid-assembly.rules-skip-if-DM_UDEV_DISABLE_.patch
Patch1001: 1001-display-timeout-status.patch
Patch1002: 1002-OnCalendar-format-fix-of-mdcheck_start-timer.patch
Patch1003: 1003-mdadm-treat-the-Dell-softraid-array-as-local-array.patch
@ -284,6 +285,7 @@ mdadm is a program that can be used to control Linux md devices.
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1