Skip to content

Commit 23fa647

Browse files
authored
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.
1 parent 74cf326 commit 23fa647

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/vm/hypervisor/kvm/kvmvmactivity.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fi
9999

100100
# Second check: disk activity check
101101
cd $MountPoint
102-
latestUpdateTime=$(stat -c %Y $(echo $UUIDList | sed 's/,/ /g') | sort -nr | head -1)
102+
latestUpdateTime=$(stat -c %Y $(echo $UUIDList | sed 's/,/ /g') 2> /dev/null | sort -nr | head -1)
103103

104104
if [ ! -f $acFile ]; then
105105
echo "$SuspectTime:$latestUpdateTime:$MSTime" > $acFile

0 commit comments

Comments
 (0)