Blame SOURCES/bz1738428-LVM-activate-detect-volume-without-reboot.patch

9cf66a
From 6c24147ebe0e979c48db93a5f8ec6094b8707591 Mon Sep 17 00:00:00 2001
9cf66a
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
9cf66a
Date: Thu, 26 Sep 2019 12:52:39 +0200
9cf66a
Subject: [PATCH] LVM-activate: move pvscan --cache to validate
9cf66a
9cf66a
It needs to be called before validate attempts to look at the VG.
9cf66a
---
9cf66a
 configure.ac           | 2 +-
9cf66a
 heartbeat/LVM-activate | 6 +++++-
9cf66a
 2 files changed, 6 insertions(+), 2 deletions(-)
9cf66a
9cf66a
diff --git a/configure.ac b/configure.ac
9cf66a
index 97dac7cf8..1eb65cf34 100644
9cf66a
--- a/configure.ac
9cf66a
+++ b/configure.ac
9cf66a
@@ -21,7 +21,7 @@ dnl     checks for system services
9cf66a
 
9cf66a
 AC_INIT([resource-agents], 
9cf66a
 	m4_esyscmd([make/git-version-gen .tarball-version]),
9cf66a
-	[to_be_defined@foobar.org])
9cf66a
+	[developers@clusterlabs.org])
9cf66a
 
9cf66a
 AC_USE_SYSTEM_EXTENSIONS
9cf66a
 
9cf66a
diff --git a/heartbeat/LVM-activate b/heartbeat/LVM-activate
9cf66a
index 3df40c894..9b7c0aa7f 100755
9cf66a
--- a/heartbeat/LVM-activate
9cf66a
+++ b/heartbeat/LVM-activate
9cf66a
@@ -489,6 +489,11 @@ lvm_validate() {
9cf66a
 	check_binary lvm
9cf66a
 	check_binary dmsetup
9cf66a
 
9cf66a
+	# This is necessary when using system ID to update lvm hints,
9cf66a
+	# or in older versions of lvm, this is necessary to update the
9cf66a
+	# lvmetad cache.
9cf66a
+	pvscan --cache
9cf66a
+
9cf66a
 	if ! vgs --foreign ${VG} >/dev/null 2>&1 ; then
9cf66a
 		# stop action exits successfully if the VG cannot be accessed...
9cf66a
 		if [ $__OCF_ACTION = "stop" ]; then
9cf66a
@@ -627,7 +632,6 @@ clvmd_activate() {
9cf66a
 systemid_activate() {
9cf66a
 	local cur_systemid
9cf66a
 
9cf66a
-	pvscan --cache
9cf66a
 	cur_systemid=$(vgs --foreign --noheadings -o systemid ${VG} | tr -d '[:blank:]')
9cf66a
 
9cf66a
 	# Put our system ID on the VG