mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 03:42:52 +09:00
B #1484: Do not nul CPU usage if cloudwatch doesn't return value
(cherry picked from commit 98f6fe5849)
This commit is contained in:
1 parent
f9aa4aae58
commit
8b18be92e3
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user