Merge "fix issue: cinder-lvm service failed to run up" into f/centos76

This commit is contained in:
Zuul 2019-01-23 15:44:57 +00:00 committed by Gerrit Code Review
commit 59873ec916
4 changed files with 19 additions and 18 deletions

View File

@ -1 +1 @@
TIS_PATCH_VER=0 TIS_PATCH_VER=1

View File

@ -30,7 +30,7 @@ diff --git a/heartbeat/LVM b/heartbeat/LVM
index 1efb207..bde381c 100755 index 1efb207..bde381c 100755
--- a/heartbeat/LVM --- a/heartbeat/LVM
+++ b/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 # Disable the LVM volume
# #
LVM_stop() { LVM_stop() {
@@ -393,6 +468,7 @@ LVM_stop() { @@ -395,6 +470,7 @@ LVM_stop() {
break break
fi fi

View File

@ -4,8 +4,8 @@ Date: Mon, 2 Oct 2017 15:12:54 -0400
Subject: [PATCH 06/13] WRS: Patch1110: lvm_vg_activation.patch Subject: [PATCH 06/13] WRS: Patch1110: lvm_vg_activation.patch
--- ---
heartbeat/LVM | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- heartbeat/LVM | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 116 insertions(+), 3 deletions(-) 1 file changed, 116 insertions(+), 1 deletion(-)
diff --git a/heartbeat/LVM b/heartbeat/LVM diff --git a/heartbeat/LVM b/heartbeat/LVM
index b0ca87a..38092f9 100755 index b0ca87a..38092f9 100755
@ -93,18 +93,18 @@ index b0ca87a..38092f9 100755
# Enable LVM volume # Enable LVM volume
# #
LVM_start() { LVM_start() {
@@ -241,9 +316,47 @@ LVM_start() { @@ -241,10 +316,50 @@ LVM_start() {
ocf_run vgscan ocf_run vgscan
fi 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 + # 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 + # the timeout period, then we'll log the not-yet-activated volumes and
+ # continue on. + # 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 + # Check every second for up to TIMEOUT seconds whether the vgchange has
+ # completed. + # completed.
+ TIMEOUT=300 + TIMEOUT=300
@ -125,14 +125,14 @@ index b0ca87a..38092f9 100755
+ # This will kick off parallel activation of all LVs in the VG. + # This will kick off parallel activation of all LVs in the VG.
+ # The delay is to ensure the VG is activated first. + # The delay is to ensure the VG is activated first.
+ PARALLEL_ACTIVATE_DONE=true + PARALLEL_ACTIVATE_DONE=true
+ ocf_log info Explicitly activating all volumes in $1 with: $vgchange_options + ocf_log info Explicitly activating all volumes in $1 with: $vgchange_activate_options
+ activate_all_volumes $1 $vgchange_options + activate_all_volumes $1 $vgchange_activate_options
+ fi + fi
+ sleep 1 + sleep 1
+ done + done
+ +
+ if [ "$TIMED_OUT" = true ] ; then + 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 + log_inactive_volumes $1
+ else + else
+ # Child process completed, get its status. + # Child process completed, get its status.
@ -141,9 +141,10 @@ index b0ca87a..38092f9 100755
+ return $OCF_ERR_GENERIC + return $OCF_ERR_GENERIC
+ fi + fi
+ fi + fi
+
if LVM_status $vg; then if LVM_status $vg; then
: OK Volume $vg activated just fine! : OK Volume $vg activated just fine!
return $OCF_SUCCESS
-- --
2.7.4 2.7.4

View File

@ -30,7 +30,7 @@ diff --git a/heartbeat/LVM b/heartbeat/LVM
index 38092f9..893ece8 100755 index 38092f9..893ece8 100755
--- a/heartbeat/LVM --- a/heartbeat/LVM
+++ b/heartbeat/LVM +++ b/heartbeat/LVM
@@ -599,9 +599,10 @@ case "$1" in @@ -601,9 +601,10 @@ case "$1" in
fi fi
exit $rc;; exit $rc;;