Skip to content

Commit

Permalink
SAPInstance: be more resilient against broken kill.sap files (Cluster…
Browse files Browse the repository at this point in the history
  • Loading branch information
fmherschel committed Dec 6, 2022
1 parent 3e84b0b commit 75d7253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion heartbeat/SAPInstance
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ sapinstance_status() {
local pids

[ ! -f "/usr/sap/$SID/$InstanceName/work/kill.sap" ] && return $OCF_NOT_RUNNING
pids=`grep '^kill -[0-9]' /usr/sap/$SID/$InstanceName/work/kill.sap | awk '{print $3}'`
pids=$(awk '$3 ~ "^[0-9]+$" { print $3 }' /usr/sap/$SID/$InstanceName/work/kill.sap)
for pid in $pids
do
[ `pgrep -f -U $sidadm $InstanceName | grep -c $pid` -gt 0 ] && return $OCF_SUCCESS
Expand Down

0 comments on commit 75d7253

Please sign in to comment.