Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VG activity bug in heartbeat/LVM script #829

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions heartbeat/LVM
Original file line number Diff line number Diff line change
Expand Up @@ -311,18 +311,15 @@ LVM_status() {
fi
fi

if [ -d /dev/$1 ]; then
test "`cd /dev/$1 && ls`" != ""
rc=$?
if [ $rc -ne 0 ]; then
ocf_exit_reason "VG $1 with no logical volumes is not supported by this RA!"
fi
fi

if [ $rc -ne 0 ]; then
# Ask lvm whether the volume group is active. This maps to
# the question "Are there any logical volumes that are active in
# the specified volume group?".
lvs --noheadings -o selected -S lv_active=active,vg_name=${1}|grep -q 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to timing issues on various storage configurations, all lvm commands were banned from the status/monitor path. There were reports about the lvm programs taking unusually long time to run and that could unfortunately also be due to another VG.

if [ $? -ne 0 ]; then
ocf_log $loglevel "LVM Volume $1 is not available (stopped)"
rc=$OCF_NOT_RUNNING
else
rc=0
case $(get_vg_mode) in
1) # exclusive with tagging.
# If vg is running, make sure the correct tag is present. Otherwise we
Expand Down