bug #1060: set VM to unknown when it cannot be monitoried

This commit is contained in:
Javi Fontan committed 2012-01-20 17:23:36 +01:00
1 parent cd9f6d6705
commit 2f4bf9bbe2
1 file changed
+6
+6
View File
@@ -68,6 +68,12 @@ end
doms_info=ganglia.get_vms_information
dom_id=domain.split('-').last
# Unknown state when the VM is not found
if !doms_info || !(doms_info[domain] || doms_info[dom_id])
puts "STATE=d"
exit(0)
end
# Get key one-<vmid> or <vmid> key from the hash
dom_info=doms_info[domain]
dom_info=doms_info[dom_id] if !dom_info