From 500de79739cd39808fb48fa556c9b9b9fe2e8acd Mon Sep 17 00:00:00 2001 From: Matthias Hensler Date: Thu, 18 Feb 2021 12:49:49 +0100 Subject: [PATCH] fix pid_status() for VirtualDomain on EL8 see https://github.com/ClusterLabs/resource-agents/issues/1613 --- heartbeat/VirtualDomain | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heartbeat/VirtualDomain b/heartbeat/VirtualDomain index eb41e3e22..f9cd21fc7 100755 --- a/heartbeat/VirtualDomain +++ b/heartbeat/VirtualDomain @@ -421,14 +421,14 @@ pid_status() case "$emulator" in qemu-kvm|qemu-dm|qemu-system-*) rc=$OCF_NOT_RUNNING - ps awx | grep -E "[q]emu-(kvm|dm|system).*-name $DOMAIN_NAME " > /dev/null 2>&1 + ps awx | grep -E "[q]emu-(kvm|dm|system).*-name ($DOMAIN_NAME|[^ ]*guest=$DOMAIN_NAME(,[^ ]*)?) " > /dev/null 2>&1 if [ $? -eq 0 ]; then rc=$OCF_SUCCESS fi ;; libvirt_lxc) rc=$OCF_NOT_RUNNING - ps awx | grep -E "[l]ibvirt_lxc.*-name $DOMAIN_NAME " > /dev/null 2>&1 + ps awx | grep -E "[l]ibvirt_lxc.*-name ($DOMAIN_NAME|[^ ]*guest=$DOMAIN_NAME(,[^ ]*)?) " > /dev/null 2>&1 if [ $? -eq 0 ]; then rc=$OCF_SUCCESS fi