This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.13
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.13 by this push:
new 23fa647 kvm: sending std output to dev/null to prevent garbage output
(#4123)
23fa647 is described below
commit 23fa6479853a4af50889c144ea561999717b8f62
Author: Spaceman1984 <[email protected]>
AuthorDate: Thu Jun 4 04:47:59 2020 +0200
kvm: sending std output to dev/null to prevent garbage output (#4123)
When scripts/vm/hypervisor/kvm/kvmvmactivity.sh is called with an incorrect
file name, an error is printed which is then interpreted as output from the
script.
When an incorrect file name is passed the script prints out:
stat: cannot stat ‘b51d7336-d964-44ee-be60-bf62783dabc’: No such file or
directory
=====> DEAD <======
The KVMHAVMActivityChecker.java checkingHB() process is expecting just
=====> DEAD <======
but gets the unexpected error message and interprets the file as alive.
---
scripts/vm/hypervisor/kvm/kvmvmactivity.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/vm/hypervisor/kvm/kvmvmactivity.sh
b/scripts/vm/hypervisor/kvm/kvmvmactivity.sh
index 88ee8f3..7e9b9b6 100755
--- a/scripts/vm/hypervisor/kvm/kvmvmactivity.sh
+++ b/scripts/vm/hypervisor/kvm/kvmvmactivity.sh
@@ -99,7 +99,7 @@ fi
# Second check: disk activity check
cd $MountPoint
-latestUpdateTime=$(stat -c %Y $(echo $UUIDList | sed 's/,/ /g') | sort -nr |
head -1)
+latestUpdateTime=$(stat -c %Y $(echo $UUIDList | sed 's/,/ /g') 2> /dev/null |
sort -nr | head -1)
if [ ! -f $acFile ]; then
echo "$SuspectTime:$latestUpdateTime:$MSTime" > $acFile