From 6c5fd844aa9fd960168ea2b008aa9006185ce50c6c817947d538760d75eb8999 Mon Sep 17 00:00:00 2001 From: LiuhuaMelody Wang Date: Tue, 21 Jul 2015 02:18:40 +0000 Subject: [PATCH 1/2] Accepting request 316548 from home:zhonglidong:branches:Base:System bug fix for 909358 and 932300 OBS-URL: https://build.opensuse.org/request/show/316548 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=132 --- ...t-state-variable-for-spurious-events.patch | 18 ++++++++ Import-ID_FS_XXX-variables-bnc909358.patch | 44 +++++++++++++++++++ lvm2.changes | 13 ++++++ lvm2.spec | 6 ++- 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 10-dm.rules-Reset-state-variable-for-spurious-events.patch create mode 100644 Import-ID_FS_XXX-variables-bnc909358.patch diff --git a/10-dm.rules-Reset-state-variable-for-spurious-events.patch b/10-dm.rules-Reset-state-variable-for-spurious-events.patch new file mode 100644 index 0000000..c9e8f27 --- /dev/null +++ b/10-dm.rules-Reset-state-variable-for-spurious-events.patch @@ -0,0 +1,18 @@ +References: bsc#932300 +--- +Index: LVM2.2.02.120/udev/10-dm.rules.in +=================================================================== +--- LVM2.2.02.120.orig/udev/10-dm.rules.in ++++ LVM2.2.02.120/udev/10-dm.rules.in +@@ -127,6 +127,11 @@ ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", + # We have to ignore further rule application for inappropriate events + # and devices. But still send the notification if cookie exists. + ++# Reset variables for spurious events ++ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}="" ++ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}="" ++ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="" ++ + # Avoid processing and scanning a DM device in the other (foreign) + # rules if it is in suspended state. However, we still keep 'disk' + # and 'DM subsystem' related rules enabled in this case. diff --git a/Import-ID_FS_XXX-variables-bnc909358.patch b/Import-ID_FS_XXX-variables-bnc909358.patch new file mode 100644 index 0000000..dc8c1ec --- /dev/null +++ b/Import-ID_FS_XXX-variables-bnc909358.patch @@ -0,0 +1,44 @@ +From 41c91bba5f696c6b6571218fcbf8bef8b41aa9d9 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 25 Mar 2015 09:44:03 +0100 +Subject: [PATCH] 13-dm-disk.rules: Import ID_FS_XXX variables from udev + database +References: bnc#909358 + +If the disk is unavailable we need to import the existing ID_FS_XXX +variables from the database, otherwise the filesystem UUID won't +be set and the by-uuid symlink will disappear, leading to +intermittent boot failures. + +Signed-off-by: Hannes Reinecke +--- + +Index: LVM2.2.02.120/udev/13-dm-disk.rules.in +=================================================================== +--- LVM2.2.02.120.orig/udev/13-dm-disk.rules.in ++++ LVM2.2.02.120/udev/13-dm-disk.rules.in +@@ -17,15 +17,22 @@ ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1 + SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}", OPTIONS+="string_escape=replace" + ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace" + +-ENV{DM_SUSPENDED}=="1", GOTO="dm_end" ++ENV{DM_SUSPENDED}=="1", GOTO="dm_blkid_end" + ENV{DM_NR_VALID_PATHS}=="0", GOTO="dm_blkid_end" + ENV{DM_NOSCAN}=="1", GOTO="dm_watch" + ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dm_end" + + (BLKID_RULE) + LABEL="dm_blkid_end" ++# For a suspended or otherwise unavailable device we ++# need to import the variables from the database, otherwise ++# a service interruption might occur ++ENV{ID_FS_TYPE}!="?*", IMPORT{db}="ID_FS_TYPE" ++ENV{ID_FS_USAGE}!="?*", IMPORT{db}="ID_FS_USAGE" ++ENV{ID_FS_UUID}!="?*", IMPORT{db}="ID_FS_UUID" ++ENV{ID_FS_UUID_ENC}!="?*", IMPORT{db}="ID_FS_UUID_ENC" ++ENV{ID_FS_VERSION}!="?*", IMPORT{db}="ID_FS_VERSION" + ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100" +-OPTIONS+="watch" + ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90" + ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" + ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" diff --git a/lvm2.changes b/lvm2.changes index 78f3493..d4df666 100644 --- a/lvm2.changes +++ b/lvm2.changes @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Tue Jul 14 05:41:55 UTC 2015 - lzhong@suse.com + +-13-dm-disk.rules: Import ID_FS_XXX variables from udev + database(bnc#909358) + If the disk is unavailable we need to import the existing ID_FS_XXX + variables from the database, otherwise the filesystem UUID won't + be set and the by-uuid symlink will disappear, leading to + intermittent boot failures + + Import-ID_FS_XXX-variables-bnc909358.patch + +-10-dm.rules: Reset state variables for spurious events (bsc#932300) + + 10-dm.rules-Reset-state-variable-for-spurious-events.patch +------------------------------------------------------------------- Tue May 19 16:30:47 UTC 2015 - jeffm@suse.com - Update to 2.02.120 diff --git a/lvm2.spec b/lvm2.spec index 7bbfde0..65fa380 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -1,7 +1,7 @@ # # spec file for package lvm2 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -87,6 +87,8 @@ Patch2005: udev-Check-for-DM_NR_VALID_PATHS.patch # suse, boo#910327 Patch2006: lvm2-do-not-strip-pdata_tools.patch Patch2007: fsadm-add-support-for-btrfs.patch +Patch2008: Import-ID_FS_XXX-variables-bnc909358.patch +Patch2009: 10-dm.rules-Reset-state-variable-for-spurious-events.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf @@ -148,6 +150,8 @@ Volume Manager. %patch2005 -p1 %patch2006 -p1 %patch2007 -p1 +%patch2008 -p1 +%patch2009 -p1 %build #set path so that thin_check can be found From 3bba7b849be12ee83185fbb06e6d324489e99df280f12729dc56cf818ac06f0d Mon Sep 17 00:00:00 2001 From: LiuhuaMelody Wang Date: Tue, 21 Jul 2015 02:47:25 +0000 Subject: [PATCH 2/2] Accepting request 317706 from home:wanglh:branches:Base:System merged bnc#935623 with request for bnc#909358&bsc#932300 OBS-URL: https://build.opensuse.org/request/show/317706 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=133 --- dmeventd-fix-dso-name-wrong-compare.patch | 36 +++++++++++++++++++++++ lvm2.changes | 26 ++++++++++------ lvm2.spec | 2 ++ 3 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 dmeventd-fix-dso-name-wrong-compare.patch diff --git a/dmeventd-fix-dso-name-wrong-compare.patch b/dmeventd-fix-dso-name-wrong-compare.patch new file mode 100644 index 0000000..54049d2 --- /dev/null +++ b/dmeventd-fix-dso-name-wrong-compare.patch @@ -0,0 +1,36 @@ +From d5246ee0d534677439cf4af780422fbb2c9068b2 Mon Sep 17 00:00:00 2001 +From: Liuhua Wang +Date: Thu, 9 Jul 2015 15:44:20 +0800 +Subject: [PATCH] dmeventd: fix dso name wrong compare + +dso_name is thought as not empty and doesn't create monitor thread, +because lvm sets empty dso_name with "-". + +Signed-off-by: Liuhua Wang +References: bnc#935623 +--- + daemons/dmeventd/dmeventd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git LVM2.2.02.120.orig/daemons/dmeventd/dmeventd.c LVM2.2.02.120/daemons/dmeventd/dmeventd.c +index e8d1e3b..3b1952c 100644 +--- LVM2.2.02.120.orig/daemons/dmeventd/dmeventd.c ++++ LVM2.2.02.120/daemons/dmeventd/dmeventd.c +@@ -1218,12 +1218,12 @@ static int _want_registered_device(char *dso_name, char *device_uuid, + struct thread_status *thread) + { + /* If DSO names and device paths are equal. */ +- if (dso_name && device_uuid) ++ if (dso_name && strcmp(dso_name, "-") && device_uuid) + return !strcmp(dso_name, thread->dso_data->dso_name) && + !strcmp(device_uuid, thread->device.uuid); + + /* If DSO names are equal. */ +- if (dso_name) ++ if (dso_name && strcmp(dso_name, "-")) + return !strcmp(dso_name, thread->dso_data->dso_name); + + /* If device paths are equal. */ +-- +1.8.4.5 + diff --git a/lvm2.changes b/lvm2.changes index d4df666..7dee22c 100644 --- a/lvm2.changes +++ b/lvm2.changes @@ -1,16 +1,24 @@ +------------------------------------------------------------------- +Tue Jul 14 09:05:13 UTC 2015 - lwang@suse.com + +- dmeventd: fix dso_name compare error. dso_name is thought as not + empty and doesn't create monitor thread. (bnc#935623) + add: dmeventd-fix-dso-name-wrong-compare.patch + ------------------------------------------------------------------- Tue Jul 14 05:41:55 UTC 2015 - lzhong@suse.com --13-dm-disk.rules: Import ID_FS_XXX variables from udev - database(bnc#909358) - If the disk is unavailable we need to import the existing ID_FS_XXX - variables from the database, otherwise the filesystem UUID won't - be set and the by-uuid symlink will disappear, leading to - intermittent boot failures - + Import-ID_FS_XXX-variables-bnc909358.patch +- 13-dm-disk.rules: Import ID_FS_XXX variables from udev + database(bnc#909358) + If the disk is unavailable we need to import the existing ID_FS_XXX + variables from the database, otherwise the filesystem UUID won't + be set and the by-uuid symlink will disappear, leading to + intermittent boot failures + + Import-ID_FS_XXX-variables-bnc909358.patch + +- 10-dm.rules: Reset state variables for spurious events (bsc#932300) + + 10-dm.rules-Reset-state-variable-for-spurious-events.patch --10-dm.rules: Reset state variables for spurious events (bsc#932300) - + 10-dm.rules-Reset-state-variable-for-spurious-events.patch ------------------------------------------------------------------- Tue May 19 16:30:47 UTC 2015 - jeffm@suse.com diff --git a/lvm2.spec b/lvm2.spec index 65fa380..e8c4314 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -73,6 +73,7 @@ Patch1015: fix-closedown-before-thread-finish.patch Patch1016: use-mirrortype-asdefault-whenclvmdrunning.patch Patch1017: version-plugins-in-libdir +Patch1018: dmeventd-fix-dso-name-wrong-compare.patch # device-mapper patches #suse, bnc#707253(also merged patch for bnc#479104) @@ -141,6 +142,7 @@ Volume Manager. %patch1015 -p1 %patch1016 -p1 %patch1017 -p1 +%patch1018 -p1 %patch2000 -p1 %patch2001 -p1