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

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