Skip to content

Commit

Permalink
Merge pull request #1419 from petrpavlu/master
Browse files Browse the repository at this point in the history
Low: NodeUtilization: Fix checking for Xen commands
  • Loading branch information
oalbrigt authored Oct 18, 2019
2 parents 7f7554c + 5cf5858 commit 161ef3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions heartbeat/NodeUtilization
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ Host_Total_Memory() {

xentool=$(which xl 2> /dev/null || which xm 2> /dev/null)

if [ -x $xentool ]; then
$xentool info | awk '/total_memory/{printf("%d\n",$3);exit(0)}'
if [ -x "$xentool" ]; then
"$xentool" info | awk '/total_memory/{printf("%d\n",$3);exit(0)}'
else
ocf_log warn "Can only set hv_memory for Xen hypervisor"
ocf_log debug "Can only set hv_memory for Xen hypervisor"
echo "0"
fi
}
Expand Down

0 comments on commit 161ef3a

Please sign in to comment.