1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #1484: Do not nul CPU usage if cloudwatch doesn't return value

(cherry picked from commit 98f6fe58498ef64bbc761e67a6dc262975c88af3)
This commit is contained in:
Tino Vazquez 2017-12-05 10:02:10 +01:00
parent f9aa4aae58
commit 8b18be92e3

View File

@ -816,7 +816,7 @@ private
if cpu[:datapoints].size != 0
cpu = cpu[:datapoints][-1][:average]
else
cpu = 0
cpu = onevm["MONITORING/CPU"] || 0
end
cpu = cpu.to_f.round(2).to_s
rescue => e