Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lvm2 for openSUSE:Factory checked in 
at 2021-02-07 15:14:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lvm2 (Old)
 and      /work/SRC/openSUSE:Factory/.lvm2.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lvm2"

Sun Feb  7 15:14:04 2021 rev:144 rq:868529 version:2.03.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/lvm2/lvm2.changes        2020-12-12 
20:27:18.301536024 +0100
+++ /work/SRC/openSUSE:Factory/.lvm2.new.28504/lvm2.changes     2021-02-07 
15:14:13.217399355 +0100
@@ -1,0 +2,7 @@
+Tue Feb 02 03:49:00 UTC 2021 - heming.z...@suse.com
+
+- lvm2 should use 'external_device_info_source="udev"' by default (bsc#1179691)
+  - add SUSE special patch to void issues in non udev env
+    + bug-1179691_config-set-external_device_info_source-none.patch
+
+-------------------------------------------------------------------

New:
----
  bug-1179691_config-set-external_device_info_source-none.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lvm2.spec ++++++
--- /var/tmp/diff_new_pack.dyyZm4/_old  2021-02-07 15:14:13.953400143 +0100
+++ /var/tmp/diff_new_pack.dyyZm4/_new  2021-02-07 15:14:13.957400147 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package lvm2
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -61,7 +61,6 @@
 Source42:       ftp://sourceware.org/pub/lvm2/LVM2.%{version}.tgz.asc
 Source99:       baselibs.conf
 # Upstream patches
-# n/a
 Patch0001:      
bug-1175565_01-tools-move-struct-element-before-variable-lenght-lis.patch
 Patch0002:      
bug-1175565_02-gcc-change-zero-sized-array-to-fexlible-array.patch
 Patch0003:      bug-1175565_03-gcc-zero-sized-array-to-fexlible-array-C99.patch
@@ -72,6 +71,7 @@
 Patch1003:      fate-31841_fsadm-add-support-for-btrfs.patch
 Patch1004:      bug-935623_dmeventd-fix-dso-name-wrong-compare.patch
 Patch1005:      bug-998893_make_pvscan_service_after_multipathd.patch
+Patch1006:      bug-1179691_config-set-external_device_info_source-none.patch
 # SUSE patches 2000+ for device mapper, udev rules
 Patch2001:      
bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
 # SUSE patches 3000+ for test code
@@ -128,6 +128,7 @@
 %patch1003 -p1
 %patch1004 -p1
 %patch1005 -p1
+%patch1006 -p1
 %patch2001 -p1
 
 %if !%{with lockd}


++++++ bug-1179691_config-set-external_device_info_source-none.patch ++++++
From: Martin Wilck <mwi...@suse.com>
Subject: [PATCH] config: set external_device_info_source=none if udev isn't 
running
Date: Wed, 27 Jan 2021 18:28:59 +0100
Message-Id: <20210127172859.956-1-mwi...@suse.com>

LVM2 has several configuration options related to device detection
and udev. In particular, we have obtain_device_list_from_udev=(0|1)
and external_device_info_source=("none"|"udev"). The two options are
obviously semantically related, but it's rather unclear if and how
they interact.

If udev is unavailable, e.g. in containers, obtain_device_list_from_udev
(which defaults to 1) will be automatically reset to 0. However,
if external_device_info_source="udev" is set, this setting is not
reset to "none", leading to error messages like

  Udev database has incomplete information about device /dev/vda.
  /dev/vda: Failed to get external handle [udev].

This patch changes that, treating external_device_info_source the
same way as obtain_device_list_from_udev, thereby making LVM2's
device detection more consistent.

The default for external_device_info_source is "none", but I believe
there are very good reasons to change this setting to "udev", because
LVM will get detection of multipath and md devices wrong most of the
time otherwise. LVM should follow the same logic as systemd and other
system components with respect to device detection.

Signed-off-by: Martin Wilck <mwi...@suse.com>
Signed-off-by: Heming Zhao <heming.z...@suse.com>,
---
 lib/commands/toolcontext.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 63b6811..55f6806 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -598,9 +598,20 @@ static int _process_config(struct cmd_context *cmd)
        dev_ext_info_src = find_config_tree_str(cmd, 
devices_external_device_info_source_CFG, NULL);
        if (dev_ext_info_src && !strcmp(dev_ext_info_src, "none"))
                init_external_device_info_source(DEV_EXT_NONE);
-       else if (dev_ext_info_src && !strcmp(dev_ext_info_src, "udev"))
-               init_external_device_info_source(DEV_EXT_UDEV);
-       else {
+       else if (dev_ext_info_src && !strcmp(dev_ext_info_src, "udev")) {
+               /*
+                * Override existing config and hardcode 
external_device_info_source==none if:
+                *   - udev is not running
+                *   - udev is disabled using DM_DISABLE_UDEV environment 
variable
+                * See also treatment of obtain_device_list_from_udev in 
_init_dev_cache()
+                */
+               if (udev_is_running())
+                       init_external_device_info_source(DEV_EXT_UDEV);
+               else  {
+                       log_notice("udev is not running. Using 
external_device_info_source==none");
+                       init_external_device_info_source(DEV_EXT_NONE);
+               }
+       } else {
                log_error("Invalid external device info source specification.");
                return 0;
        }
--
2.29.2

Reply via email to