mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
Merge branch 'master' of git.opennebula.org:one
This commit is contained in:
commit
5c3b03ba44
@ -50,9 +50,8 @@ GANGLIA_PORT=8649
|
||||
|
||||
|
||||
domain=ARGV[0]
|
||||
dom_id=ARGV[1]
|
||||
host=ARGV[2]
|
||||
|
||||
dom_id=ARGV[2]
|
||||
host=ARGV[1]
|
||||
|
||||
# Gets monitoring data from ganglia or file
|
||||
begin
|
||||
@ -69,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
|
||||
|
Loading…
Reference in New Issue
Block a user