mirror of https://github.com/apache/cloudstack.git
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.
This commit is contained in:
parent
74cf326d3b
commit
23fa647985
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue