1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

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

This commit is contained in:
Tino Vazquez 2017-12-05 10:02:10 +01:00
parent 009ca508b8
commit 98f6fe5849

View File

@ -831,7 +831,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