From 0a982310d6c70d330560d2d1657d5ec9610d9dae Mon Sep 17 00:00:00 2001 From: Shuicheng Lin Date: Wed, 23 Jan 2019 01:17:59 +0800 Subject: [PATCH] fix issue: cinder-lvm service failed to run up It leads to AIO duplex deploy failure. It is caused by resource-agents upgrade. The new srpm changed parameter "vgchange_options" to "vgchange_activate_options", so patch need be updated to use the new parameter. Story: 2004522 Task: 29025 Change-Id: I0832d93d726e8791c29395121000e0ef4dbb07f2 Signed-off-by: Shuicheng Lin --- .../centos/build_srpm.data | 2 +- .../patches/lvm_cleanup_refs_on_stop.patch | 4 +-- .../centos/patches/lvm_vg_activation.patch | 29 ++++++++++--------- ...mon-of-shutdown-before-shutting-down.patch | 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/base/cluster-resource-agents/centos/build_srpm.data b/base/cluster-resource-agents/centos/build_srpm.data index 1ca8cb845..8aeb55368 100644 --- a/base/cluster-resource-agents/centos/build_srpm.data +++ b/base/cluster-resource-agents/centos/build_srpm.data @@ -1 +1 @@ -TIS_PATCH_VER=0 +TIS_PATCH_VER=1 diff --git a/base/cluster-resource-agents/centos/patches/lvm_cleanup_refs_on_stop.patch b/base/cluster-resource-agents/centos/patches/lvm_cleanup_refs_on_stop.patch index 64ca5475a..ac5186c83 100644 --- a/base/cluster-resource-agents/centos/patches/lvm_cleanup_refs_on_stop.patch +++ b/base/cluster-resource-agents/centos/patches/lvm_cleanup_refs_on_stop.patch @@ -30,7 +30,7 @@ diff --git a/heartbeat/LVM b/heartbeat/LVM index 1efb207..bde381c 100755 --- a/heartbeat/LVM +++ b/heartbeat/LVM -@@ -365,6 +365,81 @@ LVM_start() { +@@ -367,6 +367,81 @@ LVM_start() { } # @@ -112,7 +112,7 @@ index 1efb207..bde381c 100755 # Disable the LVM volume # LVM_stop() { -@@ -393,6 +468,7 @@ LVM_stop() { +@@ -395,6 +470,7 @@ LVM_stop() { break fi diff --git a/base/cluster-resource-agents/centos/patches/lvm_vg_activation.patch b/base/cluster-resource-agents/centos/patches/lvm_vg_activation.patch index 2a98feac0..abb7c5843 100644 --- a/base/cluster-resource-agents/centos/patches/lvm_vg_activation.patch +++ b/base/cluster-resource-agents/centos/patches/lvm_vg_activation.patch @@ -4,8 +4,8 @@ Date: Mon, 2 Oct 2017 15:12:54 -0400 Subject: [PATCH 06/13] WRS: Patch1110: lvm_vg_activation.patch --- - heartbeat/LVM | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 116 insertions(+), 3 deletions(-) + heartbeat/LVM | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/heartbeat/LVM b/heartbeat/LVM index b0ca87a..38092f9 100755 @@ -93,18 +93,18 @@ index b0ca87a..38092f9 100755 # Enable LVM volume # LVM_start() { -@@ -241,9 +316,47 @@ LVM_start() { +@@ -241,10 +316,50 @@ LVM_start() { ocf_run vgscan fi -- lvm_pre_activate || exit -- ocf_run vgchange $vgchange_activate_options $vg -- lvm_post_activate $? + # Kick off activation of all volumes. If it doesn't complete within + # the timeout period, then we'll log the not-yet-activated volumes and + # continue on. -+ (ocf_run vgchange $vgchange_options $1) & PID=$! -+ + lvm_pre_activate || exit +- ocf_run vgchange $vgchange_activate_options $vg ++ (ocf_run vgchange $vgchange_activate_options $1) & PID=$! + lvm_post_activate $? + + # Check every second for up to TIMEOUT seconds whether the vgchange has + # completed. + TIMEOUT=300 @@ -120,19 +120,19 @@ index b0ca87a..38092f9 100755 + break + fi + if [ $SECONDS -ge $PARALLEL_ACTIVATE_DELAY ] && \ -+ [ "$PARALLEL_ACTIVATE_DONE" != true ] && \ -+ [ "$1" == "cinder-volumes" ] ; then ++ [ "$PARALLEL_ACTIVATE_DONE" != true ] && \ ++ [ "$1" == "cinder-volumes" ] ; then + # This will kick off parallel activation of all LVs in the VG. + # The delay is to ensure the VG is activated first. + PARALLEL_ACTIVATE_DONE=true -+ ocf_log info Explicitly activating all volumes in $1 with: $vgchange_options -+ activate_all_volumes $1 $vgchange_options ++ ocf_log info Explicitly activating all volumes in $1 with: $vgchange_activate_options ++ activate_all_volumes $1 $vgchange_activate_options + fi + sleep 1 + done + + if [ "$TIMED_OUT" = true ] ; then -+ ocf_log err "Timed out running ocf_run vgchange $vgchange_options $1" ++ ocf_log err "Timed out running ocf_run vgchange $vgchange_activate_options $1" + log_inactive_volumes $1 + else + # Child process completed, get its status. @@ -141,9 +141,10 @@ index b0ca87a..38092f9 100755 + return $OCF_ERR_GENERIC + fi + fi - ++ if LVM_status $vg; then : OK Volume $vg activated just fine! + return $OCF_SUCCESS -- 2.7.4 diff --git a/base/cluster-resource-agents/centos/patches/notify-rmon-of-shutdown-before-shutting-down.patch b/base/cluster-resource-agents/centos/patches/notify-rmon-of-shutdown-before-shutting-down.patch index b6db96c32..75e844b73 100644 --- a/base/cluster-resource-agents/centos/patches/notify-rmon-of-shutdown-before-shutting-down.patch +++ b/base/cluster-resource-agents/centos/patches/notify-rmon-of-shutdown-before-shutting-down.patch @@ -30,7 +30,7 @@ diff --git a/heartbeat/LVM b/heartbeat/LVM index 38092f9..893ece8 100755 --- a/heartbeat/LVM +++ b/heartbeat/LVM -@@ -599,9 +599,10 @@ case "$1" in +@@ -601,9 +601,10 @@ case "$1" in fi exit $rc;;