mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #696: check for errors in info xmlrpc method
This commit is contained in:
parent
947cf3fe61
commit
8772a16ff5
@ -60,16 +60,24 @@ class Watcher
|
||||
@monitors.each do |monitor|
|
||||
if monitor[:steps] > 0 and step % monitor[:steps] == 0
|
||||
monitor[:pools].each do |pool|
|
||||
resource = monitor[:resource]
|
||||
|
||||
log "#{resource.class}"
|
||||
|
||||
if pool_hash = @pool_cache[pool]
|
||||
else
|
||||
pool.info
|
||||
rc = pool.info
|
||||
if OpenNebula.is_error?(rc)
|
||||
log "Error: " + rc.message
|
||||
log "Shutting down"
|
||||
exit 1
|
||||
end
|
||||
|
||||
pool_hash = pool.to_hash
|
||||
@pool_cache[pool] = pool_hash
|
||||
end
|
||||
|
||||
resource = monitor[:resource]
|
||||
resource.insert(pool_hash)
|
||||
log(resource)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user