Accepting request 887913 from home:hmzhao:branches:openSUSE:Factory
- Honor lvm.conf event_activation=0 on "pvscan --cache -aay" (bsc#1185190) + bug-1185190_01-pvscan-support-disabled-event_activation.patch + bug-1185190_02-config-improve-description-for-event_activation.patch OBS-URL: https://build.opensuse.org/request/show/887913 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=296
This commit is contained in:
parent
a74004abdb
commit
b226ee2e0d
@ -0,0 +1,39 @@
|
||||
From 2be585b79c71b8f70c0252af5f09dbd5e6103030 Mon Sep 17 00:00:00 2001
|
||||
From: Zdenek Kabelac <zkabelac@redhat.com>
|
||||
Date: Mon, 8 Feb 2021 16:28:18 +0100
|
||||
Subject: [PATCH] pvscan: support disabled event_activation
|
||||
|
||||
In past we had this control with use_lvmetad check for
|
||||
pvscan --cache -aay
|
||||
|
||||
Howerer this got lost with lvmetad removal commit:
|
||||
117160b27e510dceb1ed6acf995115c040acd88d
|
||||
|
||||
When user sets lvm.conf global/event_activation=0
|
||||
pvscan service will no longer auto activate any LVs on appeared PVs.
|
||||
|
||||
Signed-off-by: Heming Zhao <heming.zhao@suse.com>
|
||||
---
|
||||
tools/pvscan.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff -Nupr a/tools/pvscan.c b/tools/pvscan.c
|
||||
--- a/tools/pvscan.c 2021-04-23 11:12:35.352431602 +0800
|
||||
+++ b/tools/pvscan.c 2021-04-23 11:18:29.194565976 +0800
|
||||
@@ -1224,6 +1224,12 @@ int pvscan_cache_cmd(struct cmd_context
|
||||
dm_list_init(&vgnames);
|
||||
dm_list_init(&vglist);
|
||||
|
||||
+ if (do_activate &&
|
||||
+ !find_config_tree_bool(cmd, global_event_activation_CFG, NULL)) {
|
||||
+ log_verbose("Ignoring pvscan --cache -aay because event_activation is disabled.");
|
||||
+ return ECMD_PROCESSED;
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* When systemd/udev run pvscan --cache commands, those commands
|
||||
* should not wait on udev info since the udev info may not be
|
||||
|
||||
--
|
||||
2.16.4
|
||||
|
@ -0,0 +1,39 @@
|
||||
From a616abba03a35ec3064360ac8cab9ebb2203d645 Mon Sep 17 00:00:00 2001
|
||||
From: David Teigland <teigland@redhat.com>
|
||||
Date: Mon, 19 Apr 2021 13:29:17 -0500
|
||||
Subject: [PATCH] config: improve description for event_activation
|
||||
|
||||
Signed-off-by: Heming Zhao <heming.zhao@suse.com>
|
||||
---
|
||||
lib/config/config_settings.h | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
|
||||
index 3946a7129343..d3a42a153e68 100644
|
||||
--- a/lib/config/config_settings.h
|
||||
+++ b/lib/config/config_settings.h
|
||||
@@ -1117,13 +1117,14 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa
|
||||
|
||||
cfg(global_event_activation_CFG, "event_activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 3, 1), 0, 0, NULL,
|
||||
"Activate LVs based on system-generated device events.\n"
|
||||
- "When a device appears on the system, a system-generated event runs\n"
|
||||
- "the pvscan command to activate LVs if the new PV completes the VG.\n"
|
||||
- "When event_activation is disabled, the system will generally run\n"
|
||||
- "a direct activation command to activate LVs in complete VGs.\n"
|
||||
- "Activation commands that are run by the system, either from events\n"
|
||||
- "or at fixed points during startup, use autoactivation (-aay). See\n"
|
||||
- "the --setautoactivation option or the auto_activation_volume_list\n"
|
||||
+ "When a PV appears on the system, a system-generated uevent triggers\n"
|
||||
+ "the lvm2-pvscan service which runs the pvscan --cache -aay command.\n"
|
||||
+ "If the new PV completes a VG, pvscan autoactivates LVs in the VG.\n"
|
||||
+ "When event_activation is disabled, the lvm2-activation services are\n"
|
||||
+ "generated and run at fixed points during system startup. These\n"
|
||||
+ "services run vgchange -aay to autoactivate LVs in VGs that happen\n"
|
||||
+ "to be present at that point in time.\n"
|
||||
+ "See the --setautoactivation option or the auto_activation_volume_list\n"
|
||||
"setting to configure autoactivation for specific VGs or LVs.\n")
|
||||
|
||||
cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), 0, vsn(2, 3, 0), NULL,
|
||||
--
|
||||
2.16.4
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 23 03:45:00 UTC 2021 - heming.zhao@suse.com
|
||||
|
||||
- Honor lvm.conf event_activation=0 on "pvscan --cache -aay" (bsc#1185190)
|
||||
+ bug-1185190_01-pvscan-support-disabled-event_activation.patch
|
||||
+ bug-1185190_02-config-improve-description-for-event_activation.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 21 03:04:00 UTC 2021 - heming.zhao@suse.com
|
||||
|
||||
|
@ -65,6 +65,8 @@ Patch0001: bug-1175565_01-tools-move-struct-element-before-variable-lenght-
|
||||
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
|
||||
Patch0004: bug-1178680_add-metadata-based-autoactivation-property-for-VG-an.patch
|
||||
Patch0005: bug-1185190_01-pvscan-support-disabled-event_activation.patch
|
||||
Patch0006: bug-1185190_02-config-improve-description-for-event_activation.patch
|
||||
# SUSE patches: 1000+ for LVM
|
||||
# Never upstream
|
||||
Patch1001: cmirrord_remove_date_time_from_compilation.patch
|
||||
@ -126,6 +128,8 @@ Volume Manager.
|
||||
%patch0002 -p1
|
||||
%patch0003 -p1
|
||||
%patch0004 -p1
|
||||
%patch0005 -p1
|
||||
%patch0006 -p1
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
%patch1003 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user